path: root/fs
diff options
authorJohn McCutchan <>2005-08-01 11:00:45 -0400
committerLinus Torvalds <>2005-08-01 09:16:53 -0700
commit7544953685859875b5ac0260b6b1856066c092d6 (patch)
treeacfe43ff758f7d7a6d0c575ca0e4f343b3640984 /fs
parentbe2ac68f7b66e90b8d25c168fc4d033b034f5c43 (diff)
[PATCH] inotify: fix file deletion by rename detection
When a file is moved over an existing file that you are watching, inotify won't send you a DELETE_SELF event and it won't unref the inode until the inotify instance is closed by the application. Signed-off-by: John McCutchan <> Signed-off-by: Robert Love <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'fs')
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 02a824cd3c5c..4a27eb798118 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2218,7 +2218,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry);
if (!error) {
const char *new_name = old_dentry->;
- fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir);
+ fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, new_dentry->d_inode);