fsnotify: simplify arguments passing to fsnotify_parent()
[linux-2.6-microblaze.git] / include / linux / fsnotify.h
index 751da17..860018f 100644 (file)
@@ -38,16 +38,6 @@ static inline void fsnotify_dirent(struct inode *dir, struct dentry *dentry,
        fsnotify_name(dir, mask, d_inode(dentry), &dentry->d_name, 0);
 }
 
-/* Notify this dentry's parent about a child's events. */
-static inline int fsnotify_parent(const struct path *path,
-                                 struct dentry *dentry, __u32 mask)
-{
-       if (!dentry)
-               dentry = path->dentry;
-
-       return __fsnotify_parent(path, dentry, mask);
-}
-
 /*
  * Simple wrappers to consolidate calls fsnotify_parent()/fsnotify() when
  * an event is on a file/dentry.
@@ -59,7 +49,7 @@ static inline void fsnotify_dentry(struct dentry *dentry, __u32 mask)
        if (S_ISDIR(inode->i_mode))
                mask |= FS_ISDIR;
 
-       fsnotify_parent(NULL, dentry, mask);
+       fsnotify_parent(dentry, mask, inode, FSNOTIFY_EVENT_INODE);
        fsnotify(inode, mask, inode, FSNOTIFY_EVENT_INODE, NULL, 0);
 }
 
@@ -75,7 +65,7 @@ static inline int fsnotify_file(struct file *file, __u32 mask)
        if (S_ISDIR(inode->i_mode))
                mask |= FS_ISDIR;
 
-       ret = fsnotify_parent(path, NULL, mask);
+       ret = fsnotify_parent(path->dentry, mask, path, FSNOTIFY_EVENT_PATH);
        if (ret)
                return ret;