aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/namespace.c
diff options
context:
space:
mode:
authorScott Mayhew <smayhew@redhat.com>2020-02-20 08:06:20 -0500
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-02-25 13:31:19 -0500
commit1821b26a1fed8fca57a96ef87bac7a6a48e78815 (patch)
treee7d82b2e96dd61089db0ee2f8d18af09735cf247 /fs/nfs/namespace.c
parentNFS: Ensure the fs_context has the correct fs_type before mounting (diff)
downloadlinux-dev-1821b26a1fed8fca57a96ef87bac7a6a48e78815.tar.xz
linux-dev-1821b26a1fed8fca57a96ef87bac7a6a48e78815.zip
NFS: Don't hard-code the fs_type when submounting
Hard-coding the fstype causes "nfs4" mounts to appear as "nfs", which breaks scripts that do "umount -at nfs4". Reported-by: Patrick Steinhardt <ps@pks.im> Fixes: f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to '')
-rw-r--r--fs/nfs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index ad6077404947..f3ece8ed3203 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -153,7 +153,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
/* Open a new filesystem context, transferring parameters from the
* parent superblock, including the network namespace.
*/
- fc = fs_context_for_submount(&nfs_fs_type, path->dentry);
+ fc = fs_context_for_submount(path->mnt->mnt_sb->s_type, path->dentry);
if (IS_ERR(fc))
return ERR_CAST(fc);