GIT: unionfs2-2.6.27.y: eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:50 EDT 2010
commit 17ae8862c87460096a3ccd62b17294d6c82e8376
Author: Michael Halcrow <mhalcrow at us.ibm.com>
Date: Fri Feb 16 14:09:25 2007 -0500
eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
Call the new lookup_one_len_nd() rather than lookup_one_len(). This fixes an
oops when stacked on NFS.
Note that there are still some issues with eCryptfs on NFS having to do with
directory deletion (I'm not getting an oops, just an -EBUSY).
Signed-off-by: Michael Halcrow <mhalcrow at us.ibm.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 1c1220e..837636e 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -258,7 +258,9 @@ 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;
@@ -286,9 +288,13 @@ 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);
- lower_dentry = lookup_one_len(encoded_name, lower_dir_dentry,
- encoded_namelen - 1);
+ dentry_save = nd->dentry;
+ mnt_save = nd->mnt;
+ lower_dentry = lookup_one_len_nd(encoded_name, lower_dir_dentry,
+ (encoded_namelen - 1), nd);
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);
More information about the unionfs-cvs
mailing list