summaryrefslogtreecommitdiff
path: root/net/sunrpc/rpcb_clnt.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-01-13 12:52:35 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-02-01 04:28:10 +0400
commitc2550e07a61a4528673fb85aaaee16048b7cf6cc (patch)
tree5e58dcbaa7b47d25edbad21b921573fe88f59a7b /net/sunrpc/rpcb_clnt.c
parent1a114a66466ba914a41df438e806fc10e7d9fb3b (diff)
downloadlinux-c2550e07a61a4528673fb85aaaee16048b7cf6cc.tar.xz
SUNRPC: create rpcbind client in passed network namespace context
Rpcbind clients are per network namespace. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/rpcb_clnt.c')
-rw-r--r--net/sunrpc/rpcb_clnt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 371d2298c9fc..0d76c0f09bb8 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -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",