fsnotify: remove redundant arguments to handle_event()
[sfrench/cifs-2.6.git] / fs / notify / dnotify / dnotify.c
index 63a1ca4b9deee22a786822229b8421bcdcf74e31..b4e685b63f338413850b27ecc58dbd2b88e03586 100644 (file)
@@ -79,12 +79,11 @@ static void dnotify_recalc_inode_mask(struct fsnotify_mark *fsn_mark)
  */
 static int dnotify_handle_event(struct fsnotify_group *group,
                                struct inode *inode,
-                               struct fsnotify_mark *inode_mark,
-                               struct fsnotify_mark *vfsmount_mark,
                                u32 mask, const void *data, int data_type,
                                const unsigned char *file_name, u32 cookie,
                                struct fsnotify_iter_info *iter_info)
 {
+       struct fsnotify_mark *inode_mark = fsnotify_iter_inode_mark(iter_info);
        struct dnotify_mark *dn_mark;
        struct dnotify_struct *dn;
        struct dnotify_struct **prev;
@@ -95,7 +94,8 @@ static int dnotify_handle_event(struct fsnotify_group *group,
        if (!S_ISDIR(inode->i_mode))
                return 0;
 
-       BUG_ON(vfsmount_mark);
+       if (WARN_ON(fsnotify_iter_vfsmount_mark(iter_info)))
+               return 0;
 
        dn_mark = container_of(inode_mark, struct dnotify_mark, fsn_mark);