Unionfs/eCryptfs: remove lookup_one_len_nd and LOOKUP_ONE code
authorErez_Zadok <ezk@cs.sunysb.edu>
Thu, 9 Aug 2007 21:04:19 +0000 (17:04 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 13 Jan 2009 02:31:09 +0000 (21:31 -0500)
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/namei.c
fs/unionfs/lookup.c
include/linux/namei.h

index 013d73d366539e5f285fd2606aaceb9f29ef57e7..f05bed242422eed8172c3a6acdc6b9838428eec4 100644 (file)
@@ -1030,10 +1030,6 @@ static int do_path_lookup(int dfd, const char *name,
                nd->path = fs->root;
                path_get(&fs->root);
                read_unlock(&fs->lock);
-       } else if (flags & LOOKUP_ONE) {
-               /* nd->mnt and nd->dentry already set, just grab references */
-               mntget(nd->mnt);
-               dget(nd->dentry);
        } else if (dfd == AT_FDCWD) {
                read_lock(&fs->lock);
                nd->path = fs->pwd;
@@ -2870,7 +2866,7 @@ EXPORT_SYMBOL(follow_up);
 EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
 EXPORT_SYMBOL(getname);
 EXPORT_SYMBOL(lock_rename);
-EXPORT_SYMBOL(lookup_one_len_nd);
+EXPORT_SYMBOL(lookup_one_len);
 EXPORT_SYMBOL(page_follow_link_light);
 EXPORT_SYMBOL(page_put_link);
 EXPORT_SYMBOL(page_readlink);
index 4916f25d3a4c6b48ceab5ac17a4d8577f64d934e..d8f2793a34ba7de431ee6c50f91246d724978cae 100644 (file)
@@ -227,12 +227,7 @@ struct dentry *unionfs_lookup_backend(struct dentry *dentry,
                wh_lower_dentry = NULL;
 
                /* Now do regular lookup; lookup foo */
-               nd->dentry = unionfs_lower_dentry_idx(dentry, bindex);
-               /* FIXME: fix following line for mount point crossing */
-               nd->mnt = unionfs_lower_mnt_idx(parent_dentry, bindex);
-
-               lower_dentry = lookup_one_len_nd(name, lower_dir_dentry,
-                                                namelen, nd);
+               lower_dentry = lookup_one_len(name, lower_dir_dentry, namelen);
                if (IS_ERR(lower_dentry)) {
                        dput(first_lower_dentry);
                        unionfs_mntput(first_dentry, first_dentry_offset);
@@ -323,13 +318,8 @@ out_negative:
        }
        /* This should only happen if we found a whiteout. */
        if (first_dentry_offset == -1) {
-               nd->dentry = dentry;
-               /* FIXME: fix following line for mount point crossing */
-               nd->mnt = unionfs_lower_mnt_idx(parent_dentry, bindex);
-
-               first_lower_dentry =
-                       lookup_one_len_nd(name, lower_dir_dentry,
-                                         namelen, nd);
+               first_lower_dentry = lookup_one_len(name, lower_dir_dentry,
+                                                   namelen);
                first_dentry_offset = bindex;
                if (IS_ERR(first_lower_dentry)) {
                        err = PTR_ERR(first_lower_dentry);
index 2478af7c776439a0c4ed0d8f1a3a62e828553e84..4c9f94667bd771043516f858e01da6a01b7bb2c7 100644 (file)
@@ -42,14 +42,12 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
  *  - internal "there are more path compnents" flag
  *  - locked when lookup done with dcache_lock held
  *  - dentry cache is untrusted; force a real lookup
- *  - lookup path from given dentry/vfsmount pair
  */
 #define LOOKUP_FOLLOW           1
 #define LOOKUP_DIRECTORY        2
 #define LOOKUP_CONTINUE                 4
 #define LOOKUP_PARENT          16
 #define LOOKUP_REVAL           64
-#define LOOKUP_ONE            128
 /*
  * Intent data
  */