diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 17:12:40 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 17:12:40 -0500 |
commit | 9643f5d94aadd47a5fa9754fb60f2c957de05903 (patch) | |
tree | c299736cbcdd7f971c1c308433e248198060fefa /fs/namei.c | |
parent | 2bd3a997befc226ab4b504f05c5cbba305f3e0e6 (diff) | |
parent | c44dcc56d2b5c79ba3063d20f76e5347e2e418f6 (diff) |
Merge branch 'for-fsnotify' into for-linus
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index 54d33df06be0..0741c69b3319 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1334,7 +1334,7 @@ static int may_delete(struct inode *dir,struct dentry *victim,int isdir) | |||
1334 | return -ENOENT; | 1334 | return -ENOENT; |
1335 | 1335 | ||
1336 | BUG_ON(victim->d_parent->d_inode != dir); | 1336 | BUG_ON(victim->d_parent->d_inode != dir); |
1337 | audit_inode_child(victim->d_name.name, victim, dir); | 1337 | audit_inode_child(victim, dir); |
1338 | 1338 | ||
1339 | error = inode_permission(dir, MAY_WRITE | MAY_EXEC); | 1339 | error = inode_permission(dir, MAY_WRITE | MAY_EXEC); |
1340 | if (error) | 1340 | if (error) |
@@ -2663,11 +2663,9 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
2663 | error = vfs_rename_dir(old_dir,old_dentry,new_dir,new_dentry); | 2663 | error = vfs_rename_dir(old_dir,old_dentry,new_dir,new_dentry); |
2664 | else | 2664 | else |
2665 | error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); | 2665 | error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); |
2666 | if (!error) { | 2666 | if (!error) |
2667 | const char *new_name = old_dentry->d_name.name; | 2667 | fsnotify_move(old_dir, new_dir, old_name, is_dir, |
2668 | fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, | ||
2669 | new_dentry->d_inode, old_dentry); | 2668 | new_dentry->d_inode, old_dentry); |
2670 | } | ||
2671 | fsnotify_oldname_free(old_name); | 2669 | fsnotify_oldname_free(old_name); |
2672 | 2670 | ||
2673 | return error; | 2671 | return error; |