From a22753060f63de967fcf2b739fcee0cecb3b534e Mon Sep 17 00:00:00 2001 From: Erez_Zadok Date: Thu, 9 Aug 2007 17:04:19 -0400 Subject: [PATCH] Unionfs/eCryptfs: remove lookup_one_len_nd and LOOKUP_ONE code Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Erez Zadok --- fs/namei.c | 6 +----- fs/unionfs/lookup.c | 16 +++------------- include/linux/namei.h | 2 -- 3 files changed, 4 insertions(+), 20 deletions(-) diff --git a/fs/namei.c b/fs/namei.c index 013d73d3665..f05bed24242 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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); diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c index 4916f25d3a4..d8f2793a34b 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 2478af7c776..4c9f94667bd 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 */ -- 2.43.0