Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294417
b: refs/heads/master
c: bee42f6
h: refs/heads/master
i:
  294415: e3f9c6a
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and Trond Myklebust committed Feb 1, 2012
1 parent 6154343 commit afccbb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5247fab5c82779174d50590e0200bf532248a8a1
refs/heads/master: bee42f688c915b510a4aabae4f7a99457137d6f3
9 changes: 5 additions & 4 deletions trunk/net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/slab.h>
#include <linux/nsproxy.h>

#include <linux/sunrpc/types.h>
#include <linux/sunrpc/xdr.h>
Expand Down Expand Up @@ -368,16 +369,16 @@ svc_pool_for_cpu(struct svc_serv *serv, int cpu)
return &serv->sv_pools[pidx % serv->sv_nrpools];
}

static int svc_rpcb_setup(struct svc_serv *serv)
static int svc_rpcb_setup(struct svc_serv *serv, struct net *net)
{
int err;

err = rpcb_create_local(&init_net);
err = rpcb_create_local(net);
if (err)
return err;

/* Remove any stale portmap registrations */
svc_unregister(serv, &init_net);
svc_unregister(serv, net);
return 0;
}

Expand Down Expand Up @@ -470,7 +471,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
}

if (svc_uses_rpcbind(serv)) {
if (svc_rpcb_setup(serv) < 0) {
if (svc_rpcb_setup(serv, current->nsproxy->net_ns) < 0) {
kfree(serv->sv_pools);
kfree(serv);
return NULL;
Expand Down

0 comments on commit afccbb7

Please sign in to comment.