Skip to content

Commit fdb66ff

Browse files
chuckleverTrond Myklebust
authored andcommitted
NFS: mount option parser chokes on proto=
The new text-based NFS mount option parsing logic doesn't recognize any valid transport protocols due to a silly mistake in the protocol token matching logic. This prevents basic mount requests such as: mount.nfs server:/export /mnt -o proto=tcp from working with the new text-based NFS mount API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
1 parent deee936 commit fdb66ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/nfs/super.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw,
911911
kfree(string);
912912

913913
switch (token) {
914-
case Opt_udp:
914+
case Opt_xprt_udp:
915915
mnt->flags &= ~NFS_MOUNT_TCP;
916916
mnt->nfs_server.protocol = IPPROTO_UDP;
917917
mnt->timeo = 7;
918918
mnt->retrans = 5;
919919
break;
920-
case Opt_tcp:
920+
case Opt_xprt_tcp:
921921
mnt->flags |= NFS_MOUNT_TCP;
922922
mnt->nfs_server.protocol = IPPROTO_TCP;
923923
mnt->timeo = 600;
@@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw,
936936
kfree(string);
937937

938938
switch (token) {
939-
case Opt_udp:
939+
case Opt_xprt_udp:
940940
mnt->mount_server.protocol = IPPROTO_UDP;
941941
break;
942-
case Opt_tcp:
942+
case Opt_xprt_tcp:
943943
mnt->mount_server.protocol = IPPROTO_TCP;
944944
break;
945945
default:

0 commit comments

Comments
 (0)