]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
SUNRPC: create rpcbind client in passed network namespace context
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Fri, 13 Jan 2012 08:52:35 +0000 (12:52 +0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 1 Feb 2012 00:28:10 +0000 (19:28 -0500)
Rpcbind clients are per network namespace.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpcb_clnt.c

index 371d2298c9fc96223f8e3cd6c0142d170d781e86..0d76c0f09bb81091f627f8ac7a83b2d2fb342f83 100644 (file)
@@ -344,11 +344,12 @@ out:
        return result;
 }
 
-static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr,
-                                   size_t salen, int proto, u32 version)
+static struct rpc_clnt *rpcb_create(struct net *net, char *hostname,
+                                   struct sockaddr *srvaddr, size_t salen,
+                                   int proto, u32 version)
 {
        struct rpc_create_args args = {
-               .net            = &init_net,
+               .net            = net,
                .protocol       = proto,
                .address        = srvaddr,
                .addrsize       = salen,
@@ -708,8 +709,8 @@ void rpcb_getport_async(struct rpc_task *task)
        dprintk("RPC: %5u %s: trying rpcbind version %u\n",
                task->tk_pid, __func__, bind_version);
 
-       rpcb_clnt = rpcb_create(clnt->cl_server, sap, salen, xprt->prot,
-                               bind_version);
+       rpcb_clnt = rpcb_create(xprt->xprt_net, clnt->cl_server, sap, salen,
+                               xprt->prot, bind_version);
        if (IS_ERR(rpcb_clnt)) {
                status = PTR_ERR(rpcb_clnt);
                dprintk("RPC: %5u %s: rpcb_create failed, error %ld\n",