NFS: pass transport net to rpc_pton() while parse server name
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Thu, 26 Jan 2012 11:12:05 +0000 (15:12 +0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 6 Feb 2012 23:48:05 +0000 (18:48 -0500)
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4namespace.c

index 48a9acdbaeb6d53b5e40c5ce2c903fd0e9a2dd26..667ea7406fd35b154fde443b57b7ac143dff5561 100644 (file)
@@ -97,11 +97,11 @@ static size_t nfs_parse_server_name(char *string, size_t len,
                struct sockaddr *sa, size_t salen, struct nfs_server *server)
 {
        ssize_t ret;
+       struct net *net = server->client->cl_xprt->xprt_net;
 
-       ret = rpc_pton(&init_net, string, len, sa, salen);
+       ret = rpc_pton(net, string, len, sa, salen);
        if (ret == 0) {
-               ret = nfs_dns_resolve_name(server->client->cl_xprt->xprt_net,
-                                          string, len, sa, salen);
+               ret = nfs_dns_resolve_name(net, string, len, sa, salen);
                if (ret < 0)
                        ret = 0;
        }