nfs[23] tcp breakage in mount with binary options
authorAl Viro <viro@ZenIV.linux.org.uk>
Thu, 24 Sep 2009 18:58:42 +0000 (14:58 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 24 Sep 2009 18:58:42 +0000 (14:58 -0400)
We forget to set nfs_server.protocol in tcp case when old-style binary
options are passed to mount.  The thing remains zero and never validated
afterwards.  As the result, we hit BUG in fs/nfs/client.c:588.

Breakage has been introduced in NFS: Add nfs_alloc_parsed_mount_data
merged yesterday...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/super.c

index 810770f96816ff17b3e2b1f70afc6cf528b7e61c..29786d3b93266e1d78da4e3d05e94f5fa360961a 100644 (file)
@@ -1711,6 +1711,8 @@ static int nfs_validate_mount_data(void *options,
 
                if (!(data->flags & NFS_MOUNT_TCP))
                        args->nfs_server.protocol = XPRT_TRANSPORT_UDP;
+               else
+                       args->nfs_server.protocol = XPRT_TRANSPORT_TCP;
                /* N.B. caller will free nfs_server.hostname in all cases */
                args->nfs_server.hostname = kstrdup(data->hostname, GFP_KERNEL);
                args->namlen            = data->namlen;