Skip to content

Commit

Permalink
NFS: mount option parser chokes on proto=
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
chucklever authored and Trond Myklebust committed Sep 1, 2007
1 parent deee936 commit fdb66ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,13 +911,13 @@ static int nfs_parse_mount_options(char *raw,
kfree(string);

switch (token) {
case Opt_udp:
case Opt_xprt_udp:
mnt->flags &= ~NFS_MOUNT_TCP;
mnt->nfs_server.protocol = IPPROTO_UDP;
mnt->timeo = 7;
mnt->retrans = 5;
break;
case Opt_tcp:
case Opt_xprt_tcp:
mnt->flags |= NFS_MOUNT_TCP;
mnt->nfs_server.protocol = IPPROTO_TCP;
mnt->timeo = 600;
Expand All @@ -936,10 +936,10 @@ static int nfs_parse_mount_options(char *raw,
kfree(string);

switch (token) {
case Opt_udp:
case Opt_xprt_udp:
mnt->mount_server.protocol = IPPROTO_UDP;
break;
case Opt_tcp:
case Opt_xprt_tcp:
mnt->mount_server.protocol = IPPROTO_TCP;
break;
default:
Expand Down

0 comments on commit fdb66ff

Please sign in to comment.