NFS: mount option parser chokes on proto=
authorChuck Lever <chuck.lever@oracle.com>
Wed, 29 Aug 2007 21:58:57 +0000 (17:58 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 1 Sep 2007 14:14:38 +0000 (10:14 -0400)
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>
fs/nfs/super.c

index 46139003ea0c7eb565dc7c909f86b90305d853a8..66a223b22a8079e9e0b067442e7b6ed1e32b4f77 100644 (file)
@@ -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;
@@ -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: