* [PATCH v2] Regression: fix mounting NFS when NFSv3 support is not compiled
@ 2010-10-31 16:21 Paulius Zaleckas
2010-11-02 16:21 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Paulius Zaleckas @ 2010-10-31 16:21 UTC (permalink / raw)
To: Trond.Myklebust; +Cc: linux-nfs, linux-kernel
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>
---
fs/nfs/super.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 0a42e8f..9587506 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -67,6 +67,12 @@
#define NFSDBG_FACILITY NFSDBG_VFS
+#ifdef CONFIG_NFS_V3
+#define NFS_DEFAULT_VERSION 3
+#else
+#define NFS_DEFAULT_VERSION 2
+#endif
+
enum {
/* Mount options that take no arguments */
Opt_soft, Opt_hard,
@@ -2277,7 +2283,7 @@ static int nfs_get_sb(struct file_system_type *fs_type,
};
int error = -ENOMEM;
- data = nfs_alloc_parsed_mount_data(3);
+ data = nfs_alloc_parsed_mount_data(NFS_DEFAULT_VERSION);
mntfh = nfs_alloc_fhandle();
if (data == NULL || mntfh == NULL)
goto out_free_fh;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Regression: fix mounting NFS when NFSv3 support is not compiled
@ 2010-11-02 16:21 ` Trond Myklebust
0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2010-11-02 16:21 UTC (permalink / raw)
To: Paulius Zaleckas; +Cc: linux-nfs, linux-kernel
On Sun, 2010-10-31 at 18:21 +0200, Paulius Zaleckas wrote:
> 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>
This one looks good. Applied...
Trond
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Regression: fix mounting NFS when NFSv3 support is not compiled
@ 2010-11-02 16:21 ` Trond Myklebust
0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2010-11-02 16:21 UTC (permalink / raw)
To: Paulius Zaleckas; +Cc: linux-nfs, linux-kernel
On Sun, 2010-10-31 at 18:21 +0200, Paulius Zaleckas wrote:
> 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>
This one looks good. Applied...
Trond
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-02 16:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-31 16:21 [PATCH v2] Regression: fix mounting NFS when NFSv3 support is not compiled Paulius Zaleckas
2010-11-02 16:21 ` Trond Myklebust
2010-11-02 16:21 ` Trond Myklebust
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.