diff options
author | Jan Kara <jack@suse.cz> | 2014-01-21 18:48:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-21 19:19:41 -0500 |
commit | 83c4c4b0a3aadc1ce7b5b2870ce1fc1f65498da0 (patch) | |
tree | a195ea785bb03a301773930f62d3fa45927be10d /fs/notify/inotify | |
parent | 7053aee26a3548ebaba046ae2e52396ccf56ac6c (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/inotify')
-rw-r--r-- | fs/notify/inotify/inotify_fsnotify.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c index 6fabbd163d16..aad1a35e9af1 100644 --- a/fs/notify/inotify/inotify_fsnotify.c +++ b/fs/notify/inotify/inotify_fsnotify.c | |||
@@ -81,6 +81,13 @@ int inotify_handle_event(struct fsnotify_group *group, | |||
81 | 81 | ||
82 | BUG_ON(vfsmount_mark); | 82 | BUG_ON(vfsmount_mark); |
83 | 83 | ||
84 | if ((inode_mark->mask & FS_EXCL_UNLINK) && | ||
85 | (data_type == FSNOTIFY_EVENT_PATH)) { | ||
86 | struct path *path = data; | ||
87 | |||
88 | if (d_unlinked(path->dentry)) | ||
89 | return 0; | ||
90 | } | ||
84 | if (file_name) { | 91 | if (file_name) { |
85 | len = strlen(file_name); | 92 | len = strlen(file_name); |
86 | alloc_len += len + 1; | 93 | alloc_len += len + 1; |
@@ -122,22 +129,6 @@ static void inotify_freeing_mark(struct fsnotify_mark *fsn_mark, struct fsnotify | |||
122 | inotify_ignored_and_remove_idr(fsn_mark, group); | 129 | inotify_ignored_and_remove_idr(fsn_mark, group); |
123 | } | 130 | } |
124 | 131 | ||
125 | static bool inotify_should_send_event(struct fsnotify_group *group, struct inode *inode, | ||
126 | struct fsnotify_mark *inode_mark, | ||
127 | struct fsnotify_mark *vfsmount_mark, | ||
128 | __u32 mask, void *data, int data_type) | ||
129 | { | ||
130 | if ((inode_mark->mask & FS_EXCL_UNLINK) && | ||
131 | (data_type == FSNOTIFY_EVENT_PATH)) { | ||
132 | struct path *path = data; | ||
133 | |||
134 | if (d_unlinked(path->dentry)) | ||
135 | return false; | ||
136 | } | ||
137 | |||
138 | return true; | ||
139 | } | ||
140 | |||
141 | /* | 132 | /* |
142 | * This is NEVER supposed to be called. Inotify marks should either have been | 133 | * This is NEVER supposed to be called. Inotify marks should either have been |
143 | * removed from the idr when the watch was removed or in the | 134 | * removed from the idr when the watch was removed or in the |
@@ -189,7 +180,6 @@ static void inotify_free_event(struct fsnotify_event *fsn_event) | |||
189 | 180 | ||
190 | const struct fsnotify_ops inotify_fsnotify_ops = { | 181 | const struct fsnotify_ops inotify_fsnotify_ops = { |
191 | .handle_event = inotify_handle_event, | 182 | .handle_event = inotify_handle_event, |
192 | .should_send_event = inotify_should_send_event, | ||
193 | .free_group_priv = inotify_free_group_priv, | 183 | .free_group_priv = inotify_free_group_priv, |
194 | .free_event = inotify_free_event, | 184 | .free_event = inotify_free_event, |
195 | .freeing_mark = inotify_freeing_mark, | 185 | .freeing_mark = inotify_freeing_mark, |