mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[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 <[email protected]> Signed-off-by: Robert Love <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
be2ac68f7b
commit
7544953685
2 changed files with 7 additions and 2 deletions
|
|
@ -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->d_name.name;
|
||||
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);
|
||||
}
|
||||
fsnotify_oldname_free(old_name);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue