diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2009-09-24 14:58:42 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-09-24 14:58:42 -0400 |
commit | 36dd2fdb37efdab15844eb72026f8ce3aa0fb560 (patch) | |
tree | 02639a0fc3dde84bf94a6dcb430ed61869759561 /fs/nfs | |
parent | 7a73fdde3990ea840b604248362876437ea8ce80 (diff) |
nfs[23] tcp breakage in mount with binary options
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 810770f96816..29786d3b9326 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -1711,6 +1711,8 @@ static int nfs_validate_mount_data(void *options, | |||
1711 | 1711 | ||
1712 | if (!(data->flags & NFS_MOUNT_TCP)) | 1712 | if (!(data->flags & NFS_MOUNT_TCP)) |
1713 | args->nfs_server.protocol = XPRT_TRANSPORT_UDP; | 1713 | args->nfs_server.protocol = XPRT_TRANSPORT_UDP; |
1714 | else | ||
1715 | args->nfs_server.protocol = XPRT_TRANSPORT_TCP; | ||
1714 | /* N.B. caller will free nfs_server.hostname in all cases */ | 1716 | /* N.B. caller will free nfs_server.hostname in all cases */ |
1715 | args->nfs_server.hostname = kstrdup(data->hostname, GFP_KERNEL); | 1717 | args->nfs_server.hostname = kstrdup(data->hostname, GFP_KERNEL); |
1716 | args->namlen = data->namlen; | 1718 | args->namlen = data->namlen; |