commit 6a1905b3146fea1ecb1d6319c2b0a767512d9660
Author: Erez_Zadok <[EMAIL PROTECTED]>
Date: Sat Nov 17 23:45:46 2007 -0500
Unionfs/eCryptfs: remove lookup_one_len_nd and LOOKUP_ONE code
Signed-off-by: Josef 'Jeff' Sipek <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 4ec48d3..a846557 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -266,9 +266,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;
@@ -296,13 +294,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 3ea96e6..3b993db 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1141,10 +1141,6 @@ static int fastcall do_path_lookup(int dfd, const char
*name,
nd->mnt = mntget(fs->rootmnt);
nd->dentry = dget(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->mnt = mntget(fs->pwdmnt);
@@ -2810,7 +2806,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 45ac976..1f1598d 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -158,12 +158,7 @@ struct dentry *unionfs_lookup_backend(struct dentry
*dentry,
continue;
/* 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);
@@ -242,17 +237,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);
- lower_dir_dentry = unionfs_lower_dentry_idx(parent_dentry,
- bindex);
- if (lower_dir_dentry && lower_dir_dentry->d_inode)
- first_lower_dentry =
- lookup_one_len_nd(name, lower_dir_dentry,
- namelen, nd);
- else
- first_lower_dentry = NULL;
+ 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 a42873a..63f16d9 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -48,7 +48,6 @@ 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
@@ -56,7 +55,6 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
#define LOOKUP_PARENT 16
#define LOOKUP_NOALT 32
#define LOOKUP_REVAL 64
-#define LOOKUP_ONE 128
/*
* Intent data
*/
@@ -87,12 +85,6 @@ extern void release_open_intent(struct nameidata *);
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
extern struct dentry *lookup_one_noperm(const char *, struct dentry *);
-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 **);
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs