From: Amy Griffis Date: Fri, 31 Mar 2006 10:30:54 +0000 (-0800) Subject: [PATCH] inotify: IN_DELETE events missing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a2bd3f7efa86e8b56482a8f8948c8b222064a67;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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: Amy Griffis Cc: John McCutchan Acked-by: Robert Love Cc: Nick Piggin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/dcache.c b/fs/dcache.c index 19458d399502..21dffeec755b 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -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; }