Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752401Ab1DEDBH (ORCPT ); Mon, 4 Apr 2011 23:01:07 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.125]:62957 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752287Ab1DEDBC (ORCPT ); Mon, 4 Apr 2011 23:01:02 -0400 X-Authority-Analysis: v=1.1 cv=ZtuXOl23UuD1yoJUTgnZ6i6Z5VPlPhPMWCeUNtN8OGA= c=1 sm=0 a=wom5GMh1gUkA:10 a=Ve6sBpMmpe4A:10 a=kj9zAlcOel0A:10 a=eAWTIsOZi86Vnn5xZOjC/w==:17 a=tmtSDGaQAAAA:8 a=fxJcL_dCAAAA:8 a=Z4Rwk6OoAAAA:8 a=bQVX4iqmmANRfotuKs0A:9 a=ifqdYX71zQLXizgG0HkA:7 a=CjuIK1q_8ugA:10 a=jkObVMfX7fAA:10 a=2eKvNQJKnqYA:10 a=eAWTIsOZi86Vnn5xZOjC/w==:117 X-Cloudmark-Score: 0 X-Originating-IP: 70.123.154.172 Date: Mon, 4 Apr 2011 22:01:01 -0500 From: "Serge E. Hallyn" To: Rob Landley Cc: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, containers@lists.linux-foundation.org, Trond Myklebust , Tim Spriggs , Kir Kolyshkin , Pavel Emelyanov Subject: Re: [PATCH 2/3] Supply network namespace to rpcbind. Message-ID: <20110405030101.GB6764@hallyn.com> References: <4D94319F.8040005@parallels.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D94319F.8040005@parallels.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1909 Lines: 53 Quoting Rob Landley (rlandley@parallels.com): > From: Rob Landley > > The sunrpc code already has some support for network namespaces, > but rpcb_create() is still using init_net. Its arguments include > a sockaddr and a port, but not a struct net *. Add one, and > pass in the value from rpc_xprt when calling it. > > Signed-off-by: Rob Landley Acked-by: Serge Hallyn > --- > > net/sunrpc/rpcb_clnt.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c > index c652e4c..25bb8f9 100644 > --- a/net/sunrpc/rpcb_clnt.c > +++ b/net/sunrpc/rpcb_clnt.c > @@ -223,10 +223,11 @@ out: > } > > static struct rpc_clnt *rpcb_create(char *hostname, struct sockaddr *srvaddr, > - size_t salen, int proto, u32 version) > + size_t salen, int proto, struct net *net, > + u32 version) > { > struct rpc_create_args args = { > - .net = &init_net, > + .net = net, > .protocol = proto, > .address = srvaddr, > .addrsize = salen, > @@ -591,7 +592,7 @@ void rpcb_getport_async(struct rpc_task *task) > task->tk_pid, __func__, bind_version); > > rpcb_clnt = rpcb_create(clnt->cl_server, sap, salen, xprt->prot, > - bind_version); > + xprt->xprt_net, bind_version); > if (IS_ERR(rpcb_clnt)) { > status = PTR_ERR(rpcb_clnt); > dprintk("RPC: %5u %s: rpcb_create failed, error %ld\n", > _______________________________________________ > Containers mailing list > Containers@lists.linux-foundation.org > https://lists.linux-foundation.org/mailman/listinfo/containers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/