Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185731
b: refs/heads/master
c: bec1052
h: refs/heads/master
i:
  185729: 7b8433a
  185727: 3a939f9
v: v3
  • Loading branch information
Al Viro committed Mar 3, 2010
1 parent 0d94364 commit d95531b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: db1f05bb85d7966b9176e293f3ceead1cb8b5d79
refs/heads/master: bec1052e5be6a70f03f6adc650f3a6e4c2f44ddf
7 changes: 6 additions & 1 deletion trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2262,8 +2262,11 @@ int vfs_unlink(struct inode *dir, struct dentry *dentry)
error = -EBUSY;
else {
error = security_inode_unlink(dir, dentry);
if (!error)
if (!error) {
error = dir->i_op->unlink(dir, dentry);
if (!error)
dentry->d_inode->i_flags |= S_DEAD;
}
}
mutex_unlock(&dentry->d_inode->i_mutex);

Expand Down Expand Up @@ -2616,6 +2619,8 @@ static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
else
error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry);
if (!error) {
if (target)
target->i_flags |= S_DEAD;
if (!(old_dir->i_sb->s_type->fs_flags & FS_RENAME_DOES_D_MOVE))
d_move(old_dentry, new_dentry);
}
Expand Down

0 comments on commit d95531b

Please sign in to comment.