Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147759
b: refs/heads/master
c: e42e277
h: refs/heads/master
i:
  147757: 41aaa90
  147755: 70802bc
  147751: d348e8a
  147743: 2b32fe2
v: v3
  • Loading branch information
Eric Paris committed Jun 11, 2009
1 parent 78a057c commit 38654aa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce61856bd2aadb064f595e5c0444376a2b117c41
refs/heads/master: e42e27736de80045f925564ea27a1d32957219e7
1 change: 1 addition & 0 deletions trunk/fs/notify/dnotify/dnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group,
if (!entry)
return false;

mask = (mask & ~FS_EVENT_ON_CHILD);
send = (mask & entry->mask);

fsnotify_put_mark(entry); /* matches fsnotify_find_mark_entry */
Expand Down
8 changes: 5 additions & 3 deletions trunk/fs/notify/fsnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,16 @@ void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const
struct fsnotify_group *group;
struct fsnotify_event *event = NULL;
int idx;
/* global tests shouldn't care about events on child only the specific event */
__u32 test_mask = (mask & ~FS_EVENT_ON_CHILD);

if (list_empty(&fsnotify_groups))
return;

if (!(mask & fsnotify_mask))
if (!(test_mask & fsnotify_mask))
return;

if (!(mask & to_tell->i_fsnotify_mask))
if (!(test_mask & to_tell->i_fsnotify_mask))
return;
/*
* SRCU!! the groups list is very very much read only and the path is
Expand All @@ -153,7 +155,7 @@ void fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is, const
*/
idx = srcu_read_lock(&fsnotify_grp_srcu);
list_for_each_entry_rcu(group, &fsnotify_groups, group_list) {
if (mask & group->mask) {
if (test_mask & group->mask) {
if (!group->ops->should_send_event(group, to_tell, mask))
continue;
if (!event) {
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/notify/inotify/inotify_fsnotify.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode
if (!entry)
return false;

mask = (mask & ~FS_EVENT_ON_CHILD);
send = (entry->mask & mask);

/* find took a reference */
Expand Down

0 comments on commit 38654aa

Please sign in to comment.