From 2612abb51b11ffd2d75c472b11178115f5808909 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Wed, 28 Jul 2010 10:18:39 -0400 Subject: 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 --- fs/notify/inotify/inotify_fsnotify.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'fs/notify/inotify') diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index aa3f93c..7cf518b 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; } /* -- cgit v1.1