aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorPaulius Zaleckas <paulius.zaleckas@gmail.com>2010-10-31 12:21:05 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-11-15 20:44:27 -0500
commit1e657bd51f313d87fbbb22d1edf625dba87ef353 (patch)
treee693b41296e5da158971ae7df9d73dc6e69cd4be /fs/nfs/super.c
parent8e35f8e7c61c88f9a979a4e6f7f4ffd4c158a88a (diff)
Regression: fix mounting NFS when NFSv3 support is not compiled
Trying to mount NFS (root partition in my case) fails if CONFIG_NFS_V3 is not selected. nfs_validate_mount_data() returns EPROTONOSUPPORT, because of this check: #ifndef CONFIG_NFS_V3 if (args->version == 3) goto out_v3_not_compiled; #endif /* !CONFIG_NFS_V3 */ and args->version was always initialized to 3. It was working in 2.6.36 Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 0a42e8f4adcb..9587506d493c 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -67,6 +67,12 @@
67 67
68#define NFSDBG_FACILITY NFSDBG_VFS 68#define NFSDBG_FACILITY NFSDBG_VFS
69 69
70#ifdef CONFIG_NFS_V3
71#define NFS_DEFAULT_VERSION 3
72#else
73#define NFS_DEFAULT_VERSION 2
74#endif
75
70enum { 76enum {
71 /* Mount options that take no arguments */ 77 /* Mount options that take no arguments */
72 Opt_soft, Opt_hard, 78 Opt_soft, Opt_hard,
@@ -2277,7 +2283,7 @@ static int nfs_get_sb(struct file_system_type *fs_type,
2277 }; 2283 };
2278 int error = -ENOMEM; 2284 int error = -ENOMEM;
2279 2285
2280 data = nfs_alloc_parsed_mount_data(3); 2286 data = nfs_alloc_parsed_mount_data(NFS_DEFAULT_VERSION);
2281 mntfh = nfs_alloc_fhandle(); 2287 mntfh = nfs_alloc_fhandle();
2282 if (data == NULL || mntfh == NULL) 2288 if (data == NULL || mntfh == NULL)
2283 goto out_free_fh; 2289 goto out_free_fh;