Skip to content

Commit

Permalink
SUNRPC: Use the already looked-up xprt in rpcb_getport_async()
Browse files Browse the repository at this point in the history
rbcb_getport_async() was looking up the rpc_xprt (reference++) and then
later looking it up again (reference++) to pass through the
rpcbind_args.  The xprt would only be dereferenced once, when we were
done with the rpcbind_args (reference--).  This leaves an extra
reference to the transport that would never go away.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Bryan Schumaker authored and Trond Myklebust committed Mar 27, 2012
1 parent d44fc38 commit 864cf9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ void rpcb_getport_async(struct rpc_task *task)
map->r_vers = clnt->cl_vers;
map->r_prot = xprt->prot;
map->r_port = 0;
map->r_xprt = xprt_get(xprt);
map->r_xprt = xprt;
map->r_status = -EIO;

switch (bind_version) {
Expand Down

0 comments on commit 864cf9b

Please sign in to comment.