Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251691
b: refs/heads/master
c: 912dbc1
h: refs/heads/master
i:
  251689: 54b17e2
  251687: 9ca4fc1
v: v3
  • Loading branch information
Sage Weil authored and Al Viro committed May 26, 2011
1 parent c0207f4 commit 4fd0b08
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b5afd2c406f5c6272d916fd705f44f070fbbc0ba
refs/heads/master: 912dbc15d953791f013b0c64a8093ab0490e5f40
31 changes: 17 additions & 14 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2563,23 +2563,26 @@ int vfs_rmdir(struct inode *dir, struct dentry *dentry)
return -EPERM;

mutex_lock(&dentry->d_inode->i_mutex);

error = -EBUSY;
if (d_mountpoint(dentry))
error = -EBUSY;
else {
error = security_inode_rmdir(dir, dentry);
if (!error) {
error = dir->i_op->rmdir(dir, dentry);
if (!error) {
dentry->d_inode->i_flags |= S_DEAD;
dont_mount(dentry);
}
}
}
goto out;

error = security_inode_rmdir(dir, dentry);
if (error)
goto out;

error = dir->i_op->rmdir(dir, dentry);
if (error)
goto out;

dentry->d_inode->i_flags |= S_DEAD;
dont_mount(dentry);

out:
mutex_unlock(&dentry->d_inode->i_mutex);
if (!error) {
if (!error)
d_delete(dentry);
}

return error;
}

Expand Down

0 comments on commit 4fd0b08

Please sign in to comment.