linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joris Dolderer <vorstadtkind@googlemail.com>
To: linux-kernel@vger.kernel.org
Cc: eparis@redhat.com
Subject: [PATCH 2/3] dnotify: changes for tree-watching fsnotify interface
Date: Sat, 13 Feb 2010 10:07:24 +0100	[thread overview]
Message-ID: <20100213100724.edc0aeb9.vorstadtkind@googlemail.com> (raw)

Modify dnotify for the new tree-watching fsnotify interface: check whether an event
came from a child or a far descent.
Modify fsnotify_recalc_inode_mask call.

Signed-off-by: Joris Dolderer <vorstadtkind@googlemail.com>
---
 fs/notify/dnotify/dnotify.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
index 7e54e52..6ef23cf 100644
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -71,7 +71,7 @@ static void dnotify_recalc_inode_mask(struct fsnotify_mark_entry *entry)
 		return;
 
 	if (entry->inode)
-		fsnotify_recalc_inode_mask(entry->inode);
+		fsnotify_recalc_inode_mask(entry->inode, false);
 }
 
 /*
@@ -91,7 +91,12 @@ static int dnotify_handle_event(struct fsnotify_group *group,
 	struct dnotify_struct *dn;
 	struct dnotify_struct **prev;
 	struct fown_struct *fown;
-	__u32 test_mask = event->mask & ~FS_EVENT_ON_CHILD;
+	__u32 test_mask;
+
+	if (event->mask & FS_EVENT_ON_DESCENT)
+		return 0;
+
+	test_mask = event->mask & ~FS_EVENT_ON_CHILD;
 
 	to_tell = event->to_tell;
 

                 reply	other threads:[~2010-02-13  9:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100213100724.edc0aeb9.vorstadtkind@googlemail.com \
    --to=vorstadtkind@googlemail.com \
    --cc=eparis@redhat.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).