lkml.org 
[lkml]   [2010]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/3] dnotify: changes for tree-watching fsnotify interface
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;


\
 
 \ /
  Last update: 2010-02-13 10:17    [W:0.028 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site