diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c index d62fdc875f22..f69df876fac3 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2661,11 +2661,9 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
2661 | error = vfs_rename_dir(old_dir,old_dentry,new_dir,new_dentry); | 2661 | error = vfs_rename_dir(old_dir,old_dentry,new_dir,new_dentry); |
2662 | else | 2662 | else |
2663 | error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); | 2663 | error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); |
2664 | if (!error) { | 2664 | if (!error) |
2665 | const char *new_name = old_dentry->d_name.name; | 2665 | fsnotify_move(old_dir, new_dir, old_name, is_dir, |
2666 | fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, | ||
2667 | new_dentry->d_inode, old_dentry); | 2666 | new_dentry->d_inode, old_dentry); |
2668 | } | ||
2669 | fsnotify_oldname_free(old_name); | 2667 | fsnotify_oldname_free(old_name); |
2670 | 2668 | ||
2671 | return error; | 2669 | return error; |