Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294409
b: refs/heads/master
c: 977ac31
h: refs/heads/master
i:
  294407: 34011df
v: v3
  • Loading branch information
Stanislav Kinsbursky authored and Trond Myklebust committed Feb 1, 2012
1 parent 9d802ab commit 2378a83
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 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: c2550e07a61a4528673fb85aaaee16048b7cf6cc
refs/heads/master: 977ac3157328239a0f4074b13a3d9eb5c832cd6c
5 changes: 3 additions & 2 deletions trunk/include/linux/sunrpc/clnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ void rpc_task_release_client(struct rpc_task *);

int rpcb_create_local(void);
void rpcb_put_local(void);
int rpcb_register(u32, u32, int, unsigned short);
int rpcb_v4_register(const u32 program, const u32 version,
int rpcb_register(struct net *, u32, u32, int, unsigned short);
int rpcb_v4_register(struct net *net, const u32 program,
const u32 version,
const struct sockaddr *address,
const char *netid);
void rpcb_getport_async(struct rpc_task *);
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ static int rpcb_register_call(struct rpc_clnt *clnt, struct rpc_message *msg)
* IN6ADDR_ANY (ie available for all AF_INET and AF_INET6
* addresses).
*/
int rpcb_register(u32 prog, u32 vers, int prot, unsigned short port)
int rpcb_register(struct net *net, u32 prog, u32 vers, int prot, unsigned short port)
{
struct rpcbind_args map = {
.r_prog = prog,
Expand All @@ -436,7 +436,7 @@ int rpcb_register(u32 prog, u32 vers, int prot, unsigned short port)
struct rpc_message msg = {
.rpc_argp = &map,
};
struct sunrpc_net *sn = net_generic(&init_net, sunrpc_net_id);
struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);

dprintk("RPC: %sregistering (%u, %u, %d, %u) with local "
"rpcbind\n", (port ? "" : "un"),
Expand Down Expand Up @@ -563,7 +563,7 @@ static int rpcb_unregister_all_protofamilies(struct sunrpc_net *sn,
* service on any IPv4 address, but not on IPv6. The latter
* advertises the service on all IPv4 and IPv6 addresses.
*/
int rpcb_v4_register(const u32 program, const u32 version,
int rpcb_v4_register(struct net *net, const u32 program, const u32 version,
const struct sockaddr *address, const char *netid)
{
struct rpcbind_args map = {
Expand All @@ -575,7 +575,7 @@ int rpcb_v4_register(const u32 program, const u32 version,
struct rpc_message msg = {
.rpc_argp = &map,
};
struct sunrpc_net *sn = net_generic(&init_net, sunrpc_net_id);
struct sunrpc_net *sn = net_generic(net, sunrpc_net_id);

if (sn->rpcb_local_clnt4 == NULL)
return -EPROTONOSUPPORT;
Expand Down
10 changes: 5 additions & 5 deletions trunk/net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,15 +818,15 @@ static int __svc_rpcb_register4(const u32 program, const u32 version,
return -ENOPROTOOPT;
}

error = rpcb_v4_register(program, version,
error = rpcb_v4_register(&init_net, program, version,
(const struct sockaddr *)&sin, netid);

/*
* User space didn't support rpcbind v4, so retry this
* registration request with the legacy rpcbind v2 protocol.
*/
if (error == -EPROTONOSUPPORT)
error = rpcb_register(program, version, protocol, port);
error = rpcb_register(&init_net, program, version, protocol, port);

return error;
}
Expand Down Expand Up @@ -865,7 +865,7 @@ static int __svc_rpcb_register6(const u32 program, const u32 version,
return -ENOPROTOOPT;
}

error = rpcb_v4_register(program, version,
error = rpcb_v4_register(&init_net, program, version,
(const struct sockaddr *)&sin6, netid);

/*
Expand Down Expand Up @@ -968,14 +968,14 @@ static void __svc_unregister(const u32 program, const u32 version,
{
int error;

error = rpcb_v4_register(program, version, NULL, "");
error = rpcb_v4_register(&init_net, program, version, NULL, "");

/*
* User space didn't support rpcbind v4, so retry this
* request with the legacy rpcbind v2 protocol.
*/
if (error == -EPROTONOSUPPORT)
error = rpcb_register(program, version, 0, 0);
error = rpcb_register(&init_net, program, version, 0, 0);

dprintk("svc: %s(%sv%u), error %d\n",
__func__, progname, version, error);
Expand Down

0 comments on commit 2378a83

Please sign in to comment.