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: f2aedb713c ("NFS: Add fs_context support.")
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Scott Mayhew 2020-02-20 08:06:20 -05:00 committed by Anna Schumaker
parent 1cef21842f
commit 1821b26a1f
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
/* Open a new filesystem context, transferring parameters from the /* Open a new filesystem context, transferring parameters from the
* parent superblock, including the network namespace. * 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)) if (IS_ERR(fc))
return ERR_CAST(fc); return ERR_CAST(fc);