lkml.org 
[lkml]   [2006]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] inotify: IN_DELETE events missing in -mm
Amy Griffis wrote:

>In recent -mm kernels (e.g. 2.6.16-mm1), 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.
>
>

Thanks Amy. This should go to the next -stable kernel too.

>Signed-off-by: Amy Griffis <amy.griffis@hp.com>
>
>diff --git a/fs/dcache.c b/fs/dcache.c
>index 363cd4b..344ce91 100644
>--- a/fs/dcache.c
>+++ b/fs/dcache.c
>@@ -1198,11 +1198,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;
> }
>

Send instant messages to your online friends http://au.messenger.yahoo.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-30 04:50    [W:0.043 / U:1.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site