aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/inotify
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
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')
-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
142 struct vfsmount *mnt, struct fsnotify_mark *mark, 142 struct vfsmount *mnt, struct fsnotify_mark *mark,
143 __u32 mask, void *data, int data_type) 143 __u32 mask, void *data, int data_type)
144{ 144{
145 bool send; 145 if ((mark->mask & FS_EXCL_UNLINK) &&
146
147 pr_debug("%s: group=%p inode=%p mask=%x data=%p data_type=%d\n",
148 __func__, group, inode, mask, data, data_type);
149
150 mask = (mask & ~FS_EVENT_ON_CHILD);
151 send = (mark->mask & mask);
152
153 if (send && (mark->mask & FS_EXCL_UNLINK) &&
154 (data_type == FSNOTIFY_EVENT_FILE)) { 146 (data_type == FSNOTIFY_EVENT_FILE)) {
155 struct file *file = data; 147 struct file *file = data;
156 148
157 if (d_unlinked(file->f_path.dentry)) 149 if (d_unlinked(file->f_path.dentry))
158 send = false; 150 return false;
159 } 151 }
160 152
161 return send; 153 return true;
162} 154}
163 155
164/* 156/*