Commit 7a2bd3f7 authored by Amy Griffis's avatar Amy Griffis Committed by Linus Torvalds

[PATCH] inotify: IN_DELETE events missing

IN_DELETE events are no longer generated for the removal of a file from a
watched directory.

This seems to be a result of clearing DCACHE_INOTIFY_PARENT_WATCHED in
d_delete() directly before calling fsnotify_nameremove().

Assuming the flag doesn't need to be cleared before dentry_iput(), this
should do the trick.
Signed-off-by: default avatarAmy Griffis <amy.griffis@hp.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Acked-by: default avatarRobert Love <rml@novell.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 094e320d
...@@ -1172,11 +1172,11 @@ void d_delete(struct dentry * dentry) ...@@ -1172,11 +1172,11 @@ void d_delete(struct dentry * dentry)
spin_lock(&dentry->d_lock); spin_lock(&dentry->d_lock);
isdir = S_ISDIR(dentry->d_inode->i_mode); isdir = S_ISDIR(dentry->d_inode->i_mode);
if (atomic_read(&dentry->d_count) == 1) { if (atomic_read(&dentry->d_count) == 1) {
/* remove this and other inotify debug checks after 2.6.18 */
dentry->d_flags &= ~DCACHE_INOTIFY_PARENT_WATCHED;
dentry_iput(dentry); dentry_iput(dentry);
fsnotify_nameremove(dentry, isdir); fsnotify_nameremove(dentry, isdir);
/* remove this and other inotify debug checks after 2.6.18 */
dentry->d_flags &= ~DCACHE_INOTIFY_PARENT_WATCHED;
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment