Revert "fsnotify: store struct file not struct path"
[sfrench/cifs-2.6.git] / fs / notify / fsnotify.c
index 090b64c3b4f98b7345a075f8d86eed827edf95d5..3970392b272264810574ca6536eed74bd3fc013d 100644 (file)
@@ -84,7 +84,7 @@ void __fsnotify_update_child_dentry_flags(struct inode *inode)
 }
 
 /* Notify this dentry's parent about a child's events. */
-void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask)
+void __fsnotify_parent(struct path *path, struct dentry *dentry, __u32 mask)
 {
        struct dentry *parent;
        struct inode *p_inode;
@@ -92,7 +92,7 @@ void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask)
        bool should_update_children = false;
 
        if (!dentry)
-               dentry = file->f_path.dentry;
+               dentry = path->dentry;
 
        if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED))
                return;
@@ -124,8 +124,8 @@ void __fsnotify_parent(struct file *file, struct dentry *dentry, __u32 mask)
                 * specifies these are events which came from a child. */
                mask |= FS_EVENT_ON_CHILD;
 
-               if (file)
-                       fsnotify(p_inode, mask, file, FSNOTIFY_EVENT_FILE,
+               if (path)
+                       fsnotify(p_inode, mask, path, FSNOTIFY_EVENT_PATH,
                                 dentry->d_name.name, 0);
                else
                        fsnotify(p_inode, mask, dentry->d_inode, FSNOTIFY_EVENT_INODE,
@@ -183,7 +183,7 @@ static int send_to_group(struct inode *to_tell, struct vfsmount *mnt,
        if (!inode_test_mask && !vfsmount_test_mask)
                return 0;
 
-       if (group->ops->should_send_event(group, to_tell, mnt, inode_mark,
+       if (group->ops->should_send_event(group, to_tell, inode_mark,
                                          vfsmount_mark, mask, data,
                                          data_is) == false)
                return 0;
@@ -217,8 +217,8 @@ int fsnotify(struct inode *to_tell, __u32 mask, void *data, int data_is,
        /* global tests shouldn't care about events on child only the specific event */
        __u32 test_mask = (mask & ~FS_EVENT_ON_CHILD);
 
-       if (data_is == FSNOTIFY_EVENT_FILE)
-               mnt = ((struct file *)data)->f_path.mnt;
+       if (data_is == FSNOTIFY_EVENT_PATH)
+               mnt = ((struct path *)data)->mnt;
        else
                mnt = NULL;