From: Valerie Aurora <vaurora@redhat.com>
To: David Howells <dhowells@redhat.com>
Cc: viro@ftp.linux.org.uk, jmoyer@redhat.com,
linux-fs@vger.kernel.org, autofs@linux.kernel.org,
linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org,
linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org,
Ian Kent <raven@themaw.net>
Subject: Re: [PATCH 05/17] Remove the automount through follow_link() kludge code from pathwalk
Date: Fri, 8 Oct 2010 19:41:30 -0400 [thread overview]
Message-ID: <20101008234130.GE30846@shell> (raw)
In-Reply-To: <20100930181521.30939.31415.stgit@warthog.procyon.org.uk>
On Thu, Sep 30, 2010 at 07:15:21PM +0100, David Howells wrote:
> Remove the automount through follow_link() kludge code from pathwalk in favour
> of using d_automount().
>
> Signed-off-by: David Howells <dhowells@redhat.com>
> Acked-by: Ian Kent <raven@themaw.net>
> ---
>
> fs/namei.c | 17 +++--------------
> 1 files changed, 3 insertions(+), 14 deletions(-)
>
> diff --git a/fs/namei.c b/fs/namei.c
> index c50b9d7..86421f9 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -861,17 +861,6 @@ fail:
> }
>
> /*
> - * This is a temporary kludge to deal with "automount" symlinks; proper
> - * solution is to trigger them on follow_mount(), so that do_lookup()
> - * would DTRT. To be killed before 2.6.34-final.
> - */
> -static inline int follow_on_final(struct inode *inode, unsigned lookup_flags)
> -{
> - return inode && unlikely(inode->i_op->follow_link) &&
> - ((lookup_flags & LOOKUP_FOLLOW) || S_ISDIR(inode->i_mode));
> -}
> -
> -/*
> * Name resolution.
> * This is the basic name resolution function, turning a pathname into
> * the final dentry. We expect 'base' to be positive and a directory.
> @@ -991,7 +980,8 @@ last_component:
> if (err)
> break;
> inode = next.dentry->d_inode;
> - if (follow_on_final(inode, lookup_flags)) {
> + if (inode && unlikely(inode->i_op->follow_link) &&
> + (lookup_flags & LOOKUP_FOLLOW)) {
> err = do_follow_link(&next, nd);
> if (err)
> goto return_err;
> @@ -1882,8 +1872,7 @@ reval:
> struct inode *inode = path.dentry->d_inode;
> void *cookie;
> error = -ELOOP;
> - /* S_ISDIR part is a temporary automount kludge */
> - if (!(nd.flags & LOOKUP_FOLLOW) && !S_ISDIR(inode->i_mode))
> + if (!(nd.flags & LOOKUP_FOLLOW))
> goto exit_dput;
> if (count++ == 32)
> goto exit_dput;
While you're removing kludges, I bet you can also remove this from
__follow_link():
if (path->mnt != nd->mnt) {
path_to_nameidata(path, nd);
dget(dentry);
}
mntget(path->mnt);
And replace with:
if (path->mnt == nd->mnt)
mntget(path->mnt);
This reverts the non-helper-function parts of
051d381259eb57d6074d02a6ba6e90e744f1a29f, which breaks union mounts.
-VAL
next prev parent reply other threads:[~2010-10-08 23:42 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-30 18:14 [PATCH 00/17] Introduce automounter dentry ops David Howells
2010-09-30 18:15 ` [PATCH 01/17] Add a dentry op to handle automounting rather than abusing follow_link() David Howells
2010-09-30 18:15 ` [PATCH 02/17] AFS: Use d_automount() " David Howells
2010-09-30 18:15 ` [PATCH 03/17] NFS: " David Howells
2010-09-30 18:15 ` [PATCH 04/17] CIFS: " David Howells
2010-09-30 18:15 ` [PATCH 05/17] Remove the automount through follow_link() kludge code from pathwalk David Howells
2010-10-08 23:41 ` Valerie Aurora [this message]
2010-10-10 1:16 ` Ian Kent
2010-09-30 18:15 ` [PATCH 06/17] Add an AT_NO_AUTOMOUNT flag to suppress terminal automount David Howells
2010-10-01 8:55 ` Ian Kent
2010-09-30 18:15 ` [PATCH 07/17] Make dentry::d_mounted into a more general field for special function dirs David Howells
2010-10-08 23:57 ` Valerie Aurora
2010-09-30 18:15 ` [PATCH 08/17] Make follow_down() handle d_manage() David Howells
2010-10-09 0:28 ` Valerie Aurora
2010-09-30 18:15 ` [PATCH 09/17] autofs4: add d_automount() dentry operation David Howells
2010-09-30 18:15 ` [PATCH 10/17] autofs4: add d_manage() " David Howells
2010-09-30 18:15 ` [PATCH 11/17] autofs4: removed unused code David Howells
2010-09-30 18:15 ` [PATCH 12/17] autofs4: cleanup inode operations David Howells
2010-09-30 18:16 ` [PATCH 13/17] autofs4: cleanup dentry operations David Howells
2010-09-30 18:16 ` [PATCH 14/17] autofs4: cleanup autofs4_free_ino() David Howells
2010-09-30 18:16 ` [PATCH 15/17] autofs4 - fix wait validation David Howells
2010-09-30 18:16 ` [PATCH 16/17] autofs4 - add v4 pseudo direct mount support David Howells
2010-09-30 18:16 ` [PATCH 17/17] autofs4 - bump version David Howells
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=20101008234130.GE30846@shell \
--to=vaurora@redhat.com \
--cc=autofs@linux.kernel.org \
--cc=dhowells@redhat.com \
--cc=jmoyer@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=raven@themaw.net \
--cc=viro@ftp.linux.org.uk \
/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