提交 c2550e07 编写于 作者: S Stanislav Kinsbursky 提交者: Trond Myklebust

SUNRPC: create rpcbind client in passed network namespace context

Rpcbind clients are per network namespace.
Signed-off-by: NStanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 1a114a66
......@@ -344,11 +344,12 @@ int rpcb_create_local(void)
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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册