[PATCH] inotify: IN_DELETE events missing
authorAmy Griffis <[email protected]>
Fri, 31 Mar 2006 10:30:54 +0000 (02:30 -0800)
committerLinus Torvalds <[email protected]>
Fri, 31 Mar 2006 20:18:55 +0000 (12:18 -0800)
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: Amy Griffis <[email protected]>
Cc: John McCutchan <[email protected]>
Acked-by: Robert Love <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/dcache.c

index 19458d3995024123c226e4de7a950ff71319462b..21dffeec755bc1a742e49c650c6cf13e385c93ce 100644 (file)
@@ -1172,11 +1172,11 @@ void d_delete(struct dentry * dentry)
        spin_lock(&dentry->d_lock);
        isdir = S_ISDIR(dentry->d_inode->i_mode);
        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);
                fsnotify_nameremove(dentry, isdir);
+
+               /* remove this and other inotify debug checks after 2.6.18 */
+               dentry->d_flags &= ~DCACHE_INOTIFY_PARENT_WATCHED;
                return;
        }