Messages in this thread Patch in this message | | | From | Andreas Gruenbacher <> | Subject | [BUGFIX] dnotify: handle_event shouldn't match on FS_EVENT_ON_CHILD | Date | Sun, 18 Oct 2009 14:46:42 +0200 |
| |
Mask off FS_EVENT_ON_CHILD in dnotify_handle_event(). Otherwise, when there is more than one watch on a directory and dnotify_should_send_event() succeeds, events with FS_EVENT_ON_CHILD set will trigger all watches and cause spurious events.
This case was overlooked in commit e42e2773.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de> --- fs/notify/dnotify/dnotify.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index 828a889..0a8f1de 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c @@ -106,7 +106,7 @@ static int dnotify_handle_event(struct fsnotify_group *group, spin_lock(&entry->lock); prev = &dnentry->dn; while ((dn = *prev) != NULL) { - if ((dn->dn_mask & event->mask) == 0) { + if ((dn->dn_mask & event->mask & ~FS_EVENT_ON_CHILD) == 0) { prev = &dn->dn_next; continue; } --
| |