Patchwork [net/9p] : default 9p transport module fix

login
register
mail settings
Submitter Abhishek Kulkarni
Date July 13, 2009, 1:49 p.m.
Message ID <1247492991-26009-2-git-send-email-adkulkar@umail.iu.edu>
Download mbox | patch
Permalink /patch/29732/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Abhishek Kulkarni - July 13, 2009, 1:49 p.m.
The default 9p transport module is not chosen unless an option parameter (any)
is passed to mount, which thus returns a ENOPROTOSUPPORT. This fix moves the
check out of parse_opts into p9_client_create.

Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
---
:100644 100644 cc25e63... 787ccdd... M	net/9p/client.c
 net/9p/client.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Eric Van Hensbergen - July 14, 2009, 6:29 p.m.
applied v9fs-devel

On Mon, Jul 13, 2009 at 8:49 AM, Abhishek Kulkarni<adkulkar@umail.iu.edu> wrote:
> The default 9p transport module is not chosen unless an option parameter (any)
> is passed to mount, which thus returns a ENOPROTOSUPPORT. This fix moves the
> check out of parse_opts into p9_client_create.
>
> Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
> ---
> :100644 100644 cc25e63... 787ccdd... M  net/9p/client.c
>  net/9p/client.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/9p/client.c b/net/9p/client.c
> index cc25e63..787ccdd 100644
> --- a/net/9p/client.c
> +++ b/net/9p/client.c
> @@ -117,9 +117,6 @@ static int parse_opts(char *opts, struct p9_client *clnt)
>                }
>        }
>
> -       if (!clnt->trans_mod)
> -               clnt->trans_mod = v9fs_get_default_trans();
> -
>        kfree(options);
>        return ret;
>  }
> @@ -689,6 +686,9 @@ struct p9_client *p9_client_create(const char *dev_name, char *options)
>        if (err < 0)
>                goto error;
>
> +       if (!clnt->trans_mod)
> +               clnt->trans_mod = v9fs_get_default_trans();
> +
>        if (clnt->trans_mod == NULL) {
>                err = -EPROTONOSUPPORT;
>                P9_DPRINTK(P9_DEBUG_ERROR,
> --
> 1.6.0.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/9p/client.c b/net/9p/client.c
index cc25e63..787ccdd 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -117,9 +117,6 @@  static int parse_opts(char *opts, struct p9_client *clnt)
 		}
 	}
 
-	if (!clnt->trans_mod)
-		clnt->trans_mod = v9fs_get_default_trans();
-
 	kfree(options);
 	return ret;
 }
@@ -689,6 +686,9 @@  struct p9_client *p9_client_create(const char *dev_name, char *options)
 	if (err < 0)
 		goto error;
 
+	if (!clnt->trans_mod)
+		clnt->trans_mod = v9fs_get_default_trans();
+
 	if (clnt->trans_mod == NULL) {
 		err = -EPROTONOSUPPORT;
 		P9_DPRINTK(P9_DEBUG_ERROR,