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>
This commit is contained in:
Stanislav Kinsbursky 2012-01-13 12:52:35 +04:00 коммит произвёл Trond Myklebust
Родитель 1a114a6646
Коммит c2550e07a6
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

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