summaryrefslogtreecommitdiff
path: root/fs/notify/inotify/inotify_fsnotify.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-07-28 10:18:39 -0400
committerEric Paris <eparis@redhat.com>2010-07-28 10:18:53 -0400
commit2612abb51b11ffd2d75c472b11178115f5808909 (patch)
tree5657a07a347984cc1f34117d7ef88af73ea12b60 /fs/notify/inotify/inotify_fsnotify.c
parent0215054f377ce5ac4ffc27b26b13b3f10e6410e6 (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/inotify/inotify_fsnotify.c')
-rw-r--r--fs/notify/inotify/inotify_fsnotify.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
index aa3f93c03e0f..7cf518b25daa 100644
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -142,23 +142,15 @@ static bool inotify_should_send_event(struct fsnotify_group *group, struct inode
struct vfsmount *mnt, struct fsnotify_mark *mark,
__u32 mask, void *data, int data_type)
{
- bool send;
-
- pr_debug("%s: group=%p inode=%p mask=%x data=%p data_type=%d\n",
- __func__, group, inode, mask, data, data_type);
-
- mask = (mask & ~FS_EVENT_ON_CHILD);
- send = (mark->mask & mask);
-
- if (send && (mark->mask & FS_EXCL_UNLINK) &&
+ if ((mark->mask & FS_EXCL_UNLINK) &&
(data_type == FSNOTIFY_EVENT_FILE)) {
struct file *file = data;
if (d_unlinked(file->f_path.dentry))
- send = false;
+ return false;
}
- return send;
+ return true;
}
/*