lookup_one_len_nd - lookup_one_len with nameidata argument
authorJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>
Sun, 29 Apr 2007 19:36:03 +0000 (15:36 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 23 Mar 2008 03:42:20 +0000 (23:42 -0400)
This patch renames lookup_one_len to lookup_one_len_nd, and adds a nameidata
argument. An inline function, lookup_one_len (which calls lookup_one_len_nd
with nd == NULL) preserves original behavior.

The following Unionfs patches depend on this one.

Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu>
fs/namei.c
include/linux/namei.h

index 314afe60889191b17bdefd8c5ac25cbee7345f0a..8d8c8606cb5e53b38567571d7b6cbacbf49f3e0d 100644 (file)
@@ -1358,7 +1358,8 @@ static inline int __lookup_one_len(const char *name, struct qstr *this, struct d
        return 0;
 }
 
-struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
+struct dentry *lookup_one_len_nd(const char *name, struct dentry *base, 
+                                int len, struct nameidata *nd)
 {
        int err;
        struct qstr this;
@@ -1366,7 +1367,7 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
        err = __lookup_one_len(name, &this, base, len);
        if (err)
                return ERR_PTR(err);
-       return __lookup_hash(&this, base, NULL);
+       return __lookup_hash(&this, base, nd);
 }
 
 struct dentry *lookup_one_len_kern(const char *name, struct dentry *base, int len)
@@ -2799,7 +2800,7 @@ EXPORT_SYMBOL(follow_up);
 EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
 EXPORT_SYMBOL(getname);
 EXPORT_SYMBOL(lock_rename);
-EXPORT_SYMBOL(lookup_one_len);
+EXPORT_SYMBOL(lookup_one_len_nd);
 EXPORT_SYMBOL(page_follow_link_light);
 EXPORT_SYMBOL(page_put_link);
 EXPORT_SYMBOL(page_readlink);
index 6c38efbd810f8e0354747e73b3285039ed4399ea..55fdd2766f4b28c1b61e0b61f94546fe86f27bf4 100644 (file)
@@ -81,9 +81,16 @@ extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry
 extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
 extern void release_open_intent(struct nameidata *);
 
-extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
+extern struct dentry * lookup_one_len_nd(const char *, struct dentry *,
+                                        int, struct nameidata *);
 extern struct dentry *lookup_one_len_kern(const char *, struct dentry *, int);
 
+static inline struct dentry *lookup_one_len(const char *name,
+                       struct dentry *dir, int len)
+{
+       return lookup_one_len_nd(name, dir, len, NULL);
+}
+
 extern int follow_down(struct vfsmount **, struct dentry **);
 extern int follow_up(struct vfsmount **, struct dentry **);