Wrapfs: ->lookup takes flags not a nameidata
authorErez Zadok <ezk@cs.sunysb.edu>
Wed, 5 Jun 2013 03:19:29 +0000 (23:19 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 27 Dec 2016 19:05:04 +0000 (14:05 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/wrapfs/lookup.c
fs/wrapfs/wrapfs.h

index 04c036d44e54159571a180672243782f54aa749e..fa6e019385c0b6a9e3a59c5ebc3ca274bd151e2d 100644 (file)
@@ -220,7 +220,8 @@ out:
  * Returns: NULL (ok), ERR_PTR if an error occurred.
  * Fills in lower_parent_path with <dentry,mnt> on success.
  */
-static struct dentry *__wrapfs_lookup(struct dentry *dentry, int flags,
+static struct dentry *__wrapfs_lookup(struct dentry *dentry,
+                                     unsigned int flags,
                                      struct path *lower_parent_path)
 {
        int err = 0;
@@ -296,13 +297,12 @@ out:
 }
 
 struct dentry *wrapfs_lookup(struct inode *dir, struct dentry *dentry,
-                            struct nameidata *nd)
+                            unsigned int flags)
 {
        struct dentry *ret, *parent;
        struct path lower_parent_path;
        int err = 0;
 
-       BUG_ON(!nd);
        parent = dget_parent(dentry);
 
        wrapfs_get_lower_path(parent, &lower_parent_path);
@@ -313,7 +313,7 @@ struct dentry *wrapfs_lookup(struct inode *dir, struct dentry *dentry,
                ret = ERR_PTR(err);
                goto out;
        }
-       ret = __wrapfs_lookup(dentry, nd->flags, &lower_parent_path);
+       ret = __wrapfs_lookup(dentry, flags, &lower_parent_path);
        if (IS_ERR(ret))
                goto out;
        if (ret)
index 91250b3bac321f883ed43f167cb5c1ee7daf70c9..ed49521f466733c0217666e3b57c154fd54421ae 100644 (file)
@@ -54,7 +54,7 @@ extern int new_dentry_private_data(struct dentry *dentry);
 extern void free_dentry_private_data(struct dentry *dentry);
 extern int init_lower_nd(struct nameidata *nd, unsigned int flags);
 extern struct dentry *wrapfs_lookup(struct inode *dir, struct dentry *dentry,
-                                   struct nameidata *nd);
+                                   unsigned int flags);
 extern struct inode *wrapfs_iget(struct super_block *sb,
                                 struct inode *lower_inode);
 extern int wrapfs_interpose(struct dentry *dentry, struct super_block *sb,