From: Andreas Gruenbacher <agruen@suse.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Eric Paris <eparis@redhat.com>
Subject: [BUGFIX] dnotify: handle_event shouldn't match on FS_EVENT_ON_CHILD
Date: Sun, 18 Oct 2009 14:46:42 +0200 [thread overview]
Message-ID: <200910181446.44625.agruen@suse.de> (raw)
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;
}
--
next reply other threads:[~2009-10-18 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-18 12:46 Andreas Gruenbacher [this message]
2009-10-18 12:49 ` Andreas Gruenbacher
2009-10-18 15:52 ` Eric Paris
2009-10-18 19:22 ` Andreas Gruenbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200910181446.44625.agruen@suse.de \
--to=agruen@suse.de \
--cc=akpm@linux-foundation.org \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome