mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Richard Weinberger <richard@nod.at>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Jeff Layton <jlayton@kernel.org>,
	Anna Schumaker <anna@kernel.org>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Ian Kent <raven@themaw.net>,
	"chris.chilvers@appsbroker.com" <chris.chilvers@appsbroker.com>,
	"david.young@appsbroker.com" <david.young@appsbroker.com>,
	"luis.turcitu@appsbroker.com" <luis.turcitu@appsbroker.com>,
	"david@sigma-star.at" <david@sigma-star.at>,
	"benmaynard@google.com" <benmaynard@google.com>
Subject: Re: [PATCH 2/3] namei: Allow follow_down() to uncover auto mounts
Date: Tue, 3 Jan 2023 16:15:04 +0000	[thread overview]
Message-ID: <EAE9AF79-93B8-4366-8672-20D407694E7E@oracle.com> (raw)
In-Reply-To: <20221207084309.8499-3-richard@nod.at>



> On Dec 7, 2022, at 3:43 AM, Richard Weinberger <richard@nod.at> wrote:
> 
> This function is only used by NFSD to cross mount points.
> If a mount point is of type auto mount, follow_down() will
> not uncover it. Add LOOKUP_AUTOMOUNT to the lookup flags
> to have ->d_automount() called when NFSD walks down the
> mount tree.
> 
> Signed-off-by: Richard Weinberger <richard@nod.at>

Hello Al, you are top of the maintainers listed for fs/namei.c.
I'd like to take this series for v6.3 via the nfsd tree. Can
I get your Acked-by: for this one?


> ---
> fs/namei.c            | 6 +++---
> fs/nfsd/vfs.c         | 6 +++++-
> include/linux/namei.h | 2 +-
> 3 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/namei.c b/fs/namei.c
> index 578c2110df02..a6bb6863bf0c 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1458,11 +1458,11 @@ EXPORT_SYMBOL(follow_down_one);
>  * point, the filesystem owning that dentry may be queried as to whether the
>  * caller is permitted to proceed or not.
>  */
> -int follow_down(struct path *path)
> +int follow_down(struct path *path, unsigned int flags)
> {
> 	struct vfsmount *mnt = path->mnt;
> 	bool jumped;
> -	int ret = traverse_mounts(path, &jumped, NULL, 0);
> +	int ret = traverse_mounts(path, &jumped, NULL, flags);
> 
> 	if (path->mnt != mnt)
> 		mntput(mnt);
> @@ -2864,7 +2864,7 @@ int path_pts(struct path *path)
> 
> 	path->dentry = child;
> 	dput(parent);
> -	follow_down(path);
> +	follow_down(path, 0);
> 	return 0;
> }
> #endif
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 157f0df0e93a..ced04fc2b947 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -63,9 +63,13 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
> 	struct dentry *dentry = *dpp;
> 	struct path path = {.mnt = mntget(exp->ex_path.mnt),
> 			    .dentry = dget(dentry)};
> +	unsigned int follow_flags = 0;
> 	int err = 0;
> 
> -	err = follow_down(&path);
> +	if (exp->ex_flags & NFSEXP_CROSSMOUNT)
> +		follow_flags = LOOKUP_AUTOMOUNT;
> +
> +	err = follow_down(&path, follow_flags);
> 	if (err < 0)
> 		goto out;
> 	if (path.mnt == exp->ex_path.mnt && path.dentry == dentry &&
> diff --git a/include/linux/namei.h b/include/linux/namei.h
> index 00fee52df842..6f96db73a70a 100644
> --- a/include/linux/namei.h
> +++ b/include/linux/namei.h
> @@ -77,7 +77,7 @@ struct dentry *lookup_one_positive_unlocked(struct user_namespace *mnt_userns,
> 					    struct dentry *base, int len);
> 
> extern int follow_down_one(struct path *);
> -extern int follow_down(struct path *);
> +extern int follow_down(struct path *, unsigned int flags);
> extern int follow_up(struct path *);
> 
> extern struct dentry *lock_rename(struct dentry *, struct dentry *);
> -- 
> 2.26.2
> 

--
Chuck Lever




  parent reply	other threads:[~2023-01-03 16:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07  8:43 [PATCH 0/3 v2] NFS: NFSD: Allow crossing mounts when re-exporting Richard Weinberger
2022-12-07  8:43 ` [PATCH 1/3] NFSD: Teach nfsd_mountpoint() auto mounts Richard Weinberger
2022-12-07  8:43 ` [PATCH 2/3] fs: namei: Allow follow_down() to uncover " Richard Weinberger
2022-12-14 15:15   ` [PATCH 2/3] " Chuck Lever III
2023-01-03 16:15   ` Chuck Lever III [this message]
2023-01-29 15:42     ` Richard Weinberger
2023-01-30  2:15       ` Al Viro
2022-12-07  8:43 ` [PATCH 3/3] NFS: nfs_encode_fh: Remove S_AUTOMOUNT check Richard Weinberger
2022-12-14 15:09   ` Chuck Lever III
2022-12-14 16:37     ` Anna Schumaker
2022-12-14 16:39       ` Chuck Lever III
2022-12-10 16:09 ` [PATCH 0/3 v2] NFS: NFSD: Allow crossing mounts when re-exporting Chuck Lever III
2022-12-10 21:52   ` Richard Weinberger
2022-12-10 21:53     ` Chuck Lever III
2022-12-12 17:06 ` Jeff Layton
2022-12-13  9:09   ` Ian Kent

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=EAE9AF79-93B8-4366-8672-20D407694E7E@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=anna@kernel.org \
    --cc=benmaynard@google.com \
    --cc=chris.chilvers@appsbroker.com \
    --cc=david.young@appsbroker.com \
    --cc=david@sigma-star.at \
    --cc=jlayton@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=luis.turcitu@appsbroker.com \
    --cc=raven@themaw.net \
    --cc=richard@nod.at \
    --cc=trond.myklebust@hammerspace.com \
    --cc=viro@zeniv.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

all inboxes | Powered by JetHome®