summaryrefslogtreecommitdiffstats
path: root/fs/notify/dnotify
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-01-21 15:48:15 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-21 16:19:41 -0800
commit83c4c4b0a3aadc1ce7b5b2870ce1fc1f65498da0 (patch)
treea195ea785bb03a301773930f62d3fa45927be10d /fs/notify/dnotify
parent7053aee26a3548ebaba046ae2e52396ccf56ac6c (diff)
downloadop-kernel-dev-83c4c4b0a3aadc1ce7b5b2870ce1fc1f65498da0.zip
op-kernel-dev-83c4c4b0a3aadc1ce7b5b2870ce1fc1f65498da0.tar.gz
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/dnotify')
-rw-r--r--fs/notify/dnotify/dnotify.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
index bfca53d..928688e 100644
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -94,6 +94,10 @@ static int dnotify_handle_event(struct fsnotify_group *group,
struct fown_struct *fown;
__u32 test_mask = mask & ~FS_EVENT_ON_CHILD;
+ /* not a dir, dnotify doesn't care */
+ if (!S_ISDIR(inode->i_mode))
+ return 0;
+
BUG_ON(vfsmount_mark);
dn_mark = container_of(inode_mark, struct dnotify_mark, fsn_mark);
@@ -121,23 +125,6 @@ static int dnotify_handle_event(struct fsnotify_group *group,
return 0;
}
-/*
- * Given an inode and mask determine if dnotify would be interested in sending
- * userspace notification for that pair.
- */
-static bool dnotify_should_send_event(struct fsnotify_group *group,
- struct inode *inode,
- struct fsnotify_mark *inode_mark,
- struct fsnotify_mark *vfsmount_mark,
- __u32 mask, void *data, int data_type)
-{
- /* not a dir, dnotify doesn't care */
- if (!S_ISDIR(inode->i_mode))
- return false;
-
- return true;
-}
-
static void dnotify_free_mark(struct fsnotify_mark *fsn_mark)
{
struct dnotify_mark *dn_mark = container_of(fsn_mark,
@@ -151,7 +138,6 @@ static void dnotify_free_mark(struct fsnotify_mark *fsn_mark)
static struct fsnotify_ops dnotify_fsnotify_ops = {
.handle_event = dnotify_handle_event,
- .should_send_event = dnotify_should_send_event,
.free_group_priv = NULL,
.freeing_mark = NULL,
.free_event = NULL,
OpenPOWER on IntegriCloud