aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-06-08 11:32:56 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-06-09 14:38:59 -0400
commitc5afc8da5b881633717bfc0510792428aa01fa3f (patch)
tree723bf9eacb7e8c4b80c72529ff0610e63914b80e /fs/nfs/super.c
parent906369e43c29001c39c7dfed8a01b9dff24ace75 (diff)
NFS: Use the NFS_DEFAULT_VERSION for v2 and v3 mounts
Older versions of nfs utils don't always pass a "vers=" mount option for NFS. This chould lead to attempts at using NFS v0 due to a zeroed out nfs_parsed_mount_data struct. I solve this by setting the default NFS version to NFS_DEFAULT_VERSION in the v2 and v3 cases (v4 has already been taken care of by a similar patch). Reported-by: Joerg Roedel <joro@&bytes.org> Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index bdd673141e9e..906f09c7d842 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1867,6 +1867,7 @@ static int nfs23_validate_mount_data(void *options,
1867 if (data == NULL) 1867 if (data == NULL)
1868 goto out_no_data; 1868 goto out_no_data;
1869 1869
1870 args->version = NFS_DEFAULT_VERSION;
1870 switch (data->version) { 1871 switch (data->version) {
1871 case 1: 1872 case 1:
1872 data->namlen = 0; 1873 data->namlen = 0;