From: Richard Weinberger <richard@nod.at>
To: linux-nfs@vger.kernel.org
Cc: bfields@fieldses.org, luis.turcitu@appsbroker.com,
chris.chilvers@appsbroker.com, david.young@appsbroker.com,
daire@dneg.com, david.oberhollenzer@sigma-star.at,
david@sigma-star.at, trond.myklebust@hammerspace.com,
anna.schumaker@netapp.com, Richard Weinberger <richard@nod.at>
Subject: [RFC PATCH 2/3] fs: namei: Allow follow_down() to uncover auto mounts
Date: Mon, 10 Jan 2022 19:44:18 +0100 [thread overview]
Message-ID: <20220110184419.27665-3-richard@nod.at> (raw)
In-Reply-To: <20220110184419.27665-1-richard@nod.at>
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>
---
fs/namei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/namei.c b/fs/namei.c
index 1f9d2187c765..b9de9fc4bfed 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1410,7 +1410,7 @@ int follow_down(struct path *path)
{
struct vfsmount *mnt = path->mnt;
bool jumped;
- int ret = traverse_mounts(path, &jumped, NULL, 0);
+ int ret = traverse_mounts(path, &jumped, NULL, LOOKUP_AUTOMOUNT);
if (path->mnt != mnt)
mntput(mnt);
--
2.26.2
next prev parent reply other threads:[~2022-01-10 18:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 18:44 [RFC PATCH 0/3] Dealing with NFS re-export and cross mounts Richard Weinberger
2022-01-10 18:44 ` [RFC PATCH 1/3] NFSD: Teach nfsd_mountpoint() auto mounts Richard Weinberger
2022-01-10 18:44 ` Richard Weinberger [this message]
2022-01-10 18:44 ` [RFC PATCH 3/3] NFS: nfs_encode_fh: Remove S_AUTOMOUNT check Richard Weinberger
2022-01-11 19:43 ` [RFC PATCH 0/3] Dealing with NFS re-export and cross mounts J. Bruce Fields
2022-01-11 20:01 ` J. Bruce Fields
2022-01-11 20:02 ` J. Bruce Fields
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=20220110184419.27665-3-richard@nod.at \
--to=richard@nod.at \
--cc=anna.schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=chris.chilvers@appsbroker.com \
--cc=daire@dneg.com \
--cc=david.oberhollenzer@sigma-star.at \
--cc=david.young@appsbroker.com \
--cc=david@sigma-star.at \
--cc=linux-nfs@vger.kernel.org \
--cc=luis.turcitu@appsbroker.com \
--cc=trond.myklebust@hammerspace.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).