diff mbox series

[RFC,2/3] fs: namei: Allow follow_down() to uncover auto mounts

Message ID 20220110184419.27665-3-richard@nod.at (mailing list archive)
State New, archived
Headers show
Series Dealing with NFS re-export and cross mounts | expand

Commit Message

Richard Weinberger Jan. 10, 2022, 6:44 p.m. UTC
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 mbox series

Patch

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);