GIT: unionfs2-2.6.27.y: Unionfs/eCryptfs: remove lookup_one_len_nd and LOOKUP_ONE code
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:53 EDT 2010
commit 3b171c9d8e6e290e1c500058bbb3326d07f4704d
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date: Thu Aug 9 17:04:19 2007 -0400
Unionfs/eCryptfs: remove lookup_one_len_nd and LOOKUP_ONE code
Signed-off-by: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 65ae18c..b3c7d29 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -258,9 +258,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
int rc = 0;
struct dentry *lower_dir_dentry;
struct dentry *lower_dentry;
- struct dentry *dentry_save;
struct vfsmount *lower_mnt;
- struct vfsmount *mnt_save;
char *encoded_name;
int encoded_namelen;
struct ecryptfs_crypt_stat *crypt_stat = NULL;
@@ -288,13 +286,9 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
}
ecryptfs_printk(KERN_DEBUG, "encoded_name = [%s]; encoded_namelen "
"= [%d]\n", encoded_name, encoded_namelen);
- dentry_save = nd->dentry;
- mnt_save = nd->mnt;
- lower_dentry = lookup_one_len_nd(encoded_name, lower_dir_dentry,
- (encoded_namelen - 1), nd);
+ lower_dentry = lookup_one_len(encoded_name, lower_dir_dentry,
+ encoded_namelen - 1);
kfree(encoded_name);
- nd->mnt = mnt_save;
- nd->dentry = dentry_save;
if (IS_ERR(lower_dentry)) {
ecryptfs_printk(KERN_ERR, "ERR from lower_dentry\n");
rc = PTR_ERR(lower_dentry);
diff --git a/fs/namei.c b/fs/namei.c
index bb45e23..832cd4b 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1070,10 +1070,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;
@@ -2866,7 +2862,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);
diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 4916f25..d8f2793 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -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);
diff --git a/include/linux/namei.h b/include/linux/namei.h
index b49720f..e96e84b 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -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
*/
More information about the unionfs-cvs
mailing list