diff options
author | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:39 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:53 -0400 |
commit | 2612abb51b11ffd2d75c472b11178115f5808909 (patch) | |
tree | 5657a07a347984cc1f34117d7ef88af73ea12b60 /fs/notify/fanotify | |
parent | 0215054f377ce5ac4ffc27b26b13b3f10e6410e6 (diff) |
fsnotify: cleanup should_send_event
The change to use srcu and walk the object list rather than the global
fsnotify_group list means that should_send_event is no longer needed for a
number of groups and can be simplified for others. Do that.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/fanotify')
-rw-r--r-- | fs/notify/fanotify/fanotify.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 666ccb733066..fbd7f35c6134 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c | |||
@@ -185,22 +185,15 @@ static bool should_send_inode_event(struct fsnotify_group *group, | |||
185 | pr_debug("%s: group=%p inode=%p mark=%p mask=%x\n", | 185 | pr_debug("%s: group=%p inode=%p mark=%p mask=%x\n", |
186 | __func__, group, inode, mark, mask); | 186 | __func__, group, inode, mark, mask); |
187 | 187 | ||
188 | /* if the event is for a child and this inode doesn't care about | 188 | /* |
189 | * events on the child, don't send it! */ | 189 | * if the event is for a child and this inode doesn't care about |
190 | * events on the child, don't send it! | ||
191 | */ | ||
190 | if ((mask & FS_EVENT_ON_CHILD) && | 192 | if ((mask & FS_EVENT_ON_CHILD) && |
191 | !(mark->mask & FS_EVENT_ON_CHILD)) { | 193 | !(mark->mask & FS_EVENT_ON_CHILD)) |
192 | mask = 0; | 194 | return false; |
193 | } else { | 195 | else |
194 | /* | 196 | return true; |
195 | * We care about children, but do we care about this particular | ||
196 | * type of event? | ||
197 | */ | ||
198 | mask &= ~FS_EVENT_ON_CHILD; | ||
199 | mask &= mark->mask; | ||
200 | mask &= ~mark->ignored_mask; | ||
201 | } | ||
202 | |||
203 | return mask; | ||
204 | } | 197 | } |
205 | 198 | ||
206 | static bool fanotify_should_send_event(struct fsnotify_group *group, struct inode *to_tell, | 199 | static bool fanotify_should_send_event(struct fsnotify_group *group, struct inode *to_tell, |