]> Pileus Git - ~andy/linux/blobdiff - fs/notify/dnotify/dnotify.c
fsnotify: remove .should_send_event callback
[~andy/linux] / fs / notify / dnotify / dnotify.c
index 1fedd5f7ccc4ed24398d19eda55a26380462095c..928688e3ee2f860cffc428cf396ae67fe7bbcea2 100644 (file)
@@ -82,20 +82,23 @@ static void dnotify_recalc_inode_mask(struct fsnotify_mark *fsn_mark)
  * events.
  */
 static int dnotify_handle_event(struct fsnotify_group *group,
+                               struct inode *inode,
                                struct fsnotify_mark *inode_mark,
                                struct fsnotify_mark *vfsmount_mark,
-                               struct fsnotify_event *event)
+                               u32 mask, void *data, int data_type,
+                               const unsigned char *file_name)
 {
        struct dnotify_mark *dn_mark;
-       struct inode *to_tell;
        struct dnotify_struct *dn;
        struct dnotify_struct **prev;
        struct fown_struct *fown;
-       __u32 test_mask = event->mask & ~FS_EVENT_ON_CHILD;
+       __u32 test_mask = mask & ~FS_EVENT_ON_CHILD;
 
-       BUG_ON(vfsmount_mark);
+       /* not a dir, dnotify doesn't care */
+       if (!S_ISDIR(inode->i_mode))
+               return 0;
 
-       to_tell = event->to_tell;
+       BUG_ON(vfsmount_mark);
 
        dn_mark = container_of(inode_mark, struct dnotify_mark, fsn_mark);
 
@@ -122,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,
@@ -152,10 +138,9 @@ 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_priv = NULL,
+       .free_event = NULL,
 };
 
 /*