Skip to content

Commit 1821b26

Browse files
scottmayhewamschuma-ntap
authored andcommitted
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: f2aedb7 ("NFS: Add fs_context support.") Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 1cef218 commit 1821b26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/nfs/namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
153153
/* Open a new filesystem context, transferring parameters from the
154154
* parent superblock, including the network namespace.
155155
*/
156-
fc = fs_context_for_submount(&nfs_fs_type, path->dentry);
156+
fc = fs_context_for_submount(path->mnt->mnt_sb->s_type, path->dentry);
157157
if (IS_ERR(fc))
158158
return ERR_CAST(fc);
159159

0 commit comments

Comments
 (0)