aboutsummaryrefslogtreecommitdiffstats
path: root/fs/notify/fanotify/fanotify.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-01-21 18:48:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-21 19:19:41 -0500
commit83c4c4b0a3aadc1ce7b5b2870ce1fc1f65498da0 (patch)
treea195ea785bb03a301773930f62d3fa45927be10d /fs/notify/fanotify/fanotify.c
parent7053aee26a3548ebaba046ae2e52396ccf56ac6c (diff)
fsnotify: remove .should_send_event callback
After removing event structure creation from the generic layer there is no reason for separate .should_send_event and .handle_event callbacks. So just remove the first one. Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Eric Paris <eparis@parisplace.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/notify/fanotify/fanotify.c')
-rw-r--r--fs/notify/fanotify/fanotify.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index c26268d7bd9d..1f8f05220f8d 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -88,18 +88,17 @@ static int fanotify_get_response_from_access(struct fsnotify_group *group,
88} 88}
89#endif 89#endif
90 90
91static bool fanotify_should_send_event(struct fsnotify_group *group, 91static bool fanotify_should_send_event(struct fsnotify_mark *inode_mark,
92 struct inode *inode,
93 struct fsnotify_mark *inode_mark,
94 struct fsnotify_mark *vfsmnt_mark, 92 struct fsnotify_mark *vfsmnt_mark,
95 __u32 event_mask, void *data, int data_type) 93 u32 event_mask,
94 void *data, int data_type)
96{ 95{
97 __u32 marks_mask, marks_ignored_mask; 96 __u32 marks_mask, marks_ignored_mask;
98 struct path *path = data; 97 struct path *path = data;
99 98
100 pr_debug("%s: group=%p inode=%p inode_mark=%p vfsmnt_mark=%p " 99 pr_debug("%s: inode_mark=%p vfsmnt_mark=%p mask=%x data=%p"
101 "mask=%x data=%p data_type=%d\n", __func__, group, inode, 100 " data_type=%d\n", __func__, inode_mark, vfsmnt_mark,
102 inode_mark, vfsmnt_mark, event_mask, data, data_type); 101 event_mask, data, data_type);
103 102
104 /* if we don't have enough info to send an event to userspace say no */ 103 /* if we don't have enough info to send an event to userspace say no */
105 if (data_type != FSNOTIFY_EVENT_PATH) 104 if (data_type != FSNOTIFY_EVENT_PATH)
@@ -163,6 +162,10 @@ static int fanotify_handle_event(struct fsnotify_group *group,
163 BUILD_BUG_ON(FAN_ACCESS_PERM != FS_ACCESS_PERM); 162 BUILD_BUG_ON(FAN_ACCESS_PERM != FS_ACCESS_PERM);
164 BUILD_BUG_ON(FAN_ONDIR != FS_ISDIR); 163 BUILD_BUG_ON(FAN_ONDIR != FS_ISDIR);
165 164
165 if (!fanotify_should_send_event(inode_mark, fanotify_mark, mask, data,
166 data_type))
167 return 0;
168
166 pr_debug("%s: group=%p inode=%p mask=%x\n", __func__, group, inode, 169 pr_debug("%s: group=%p inode=%p mask=%x\n", __func__, group, inode,
167 mask); 170 mask);
168 171
@@ -225,7 +228,6 @@ static void fanotify_free_event(struct fsnotify_event *fsn_event)
225 228
226const struct fsnotify_ops fanotify_fsnotify_ops = { 229const struct fsnotify_ops fanotify_fsnotify_ops = {
227 .handle_event = fanotify_handle_event, 230 .handle_event = fanotify_handle_event,
228 .should_send_event = fanotify_should_send_event,
229 .free_group_priv = fanotify_free_group_priv, 231 .free_group_priv = fanotify_free_group_priv,
230 .free_event = fanotify_free_event, 232 .free_event = fanotify_free_event,
231 .freeing_mark = NULL, 233 .freeing_mark = NULL,