From: Christoph Hellwig <hch@infradead.org>
To: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
akpm@linux-foundation.org, Michael Halcrow <mhalcrow@us.ibm.com>
Subject: Re: [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd()
Date: Fri, 9 Mar 2007 09:40:00 +0000 [thread overview]
Message-ID: <20070309094000.GA28599@infradead.org> (raw)
In-Reply-To: <11717026163831-git-send-email-jsipek@cs.sunysb.edu>
On Sat, Feb 17, 2007 at 03:56:55AM -0500, Josef 'Jeff' Sipek wrote:
> From: Michael Halcrow <mhalcrow@us.ibm.com>
>
> 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).
Biug NACK here. This is just working around the broken lookup intents
code. lookup_one_len still is a hack for some network filesystems that
unfortunately grew a few too many users.
There is a valid case for in-kernel lookups from an arbitrary point,
but lookup_one_len* is the wrong API for this. The righ API for that
is a variant of path?lookup that takes a vfsmount + dentry pair.
Implementing this might be a good idea anyway to clean up the mess
do_path_lookup is currently.
>
> Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
> ---
> fs/ecryptfs/inode.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
> index 11f5e50..4c3d786 100644
> --- a/fs/ecryptfs/inode.c
> +++ b/fs/ecryptfs/inode.c
> @@ -283,7 +283,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;
> unsigned int encoded_namelen;
> struct ecryptfs_crypt_stat *crypt_stat = NULL;
> @@ -310,9 +312,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);
> --
> 1.5.0.19.gddff
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
---end quoted text---
next prev parent reply other threads:[~2007-03-09 9:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-17 8:56 [GIT PULL -mm] Unionfs/eCryptfs cleanups Josef 'Jeff' Sipek
2007-02-17 8:56 ` [PATCH 1/2] eCryptfs: convert lookup_one_len() to lookup_one_len_nd() Josef 'Jeff' Sipek
2007-03-09 9:40 ` Christoph Hellwig [this message]
2007-03-09 16:34 ` Josef Sipek
2007-02-17 8:56 ` [PATCH 2/2] fs/unionfs/: Remove unused structure members & macros Josef 'Jeff' Sipek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070309094000.GA28599@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jsipek@cs.sunysb.edu \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhalcrow@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).