diff options
author | Scott Mayhew <smayhew@redhat.com> | 2020-02-20 08:06:20 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-02-25 13:31:19 -0500 |
commit | 1821b26a1fed8fca57a96ef87bac7a6a48e78815 (patch) | |
tree | e7d82b2e96dd61089db0ee2f8d18af09735cf247 /fs/nfs/namespace.c | |
parent | 1cef21842ff3b6043c459b6462183e70295b5b19 (diff) | |
download | lwn-1821b26a1fed8fca57a96ef87bac7a6a48e78815.tar.gz lwn-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 'fs/nfs/namespace.c')
-rw-r--r-- | fs/nfs/namespace.c | 2 |
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); |