Skip to contentSkip to conversation

SUNRPC: Use the already looked-up xprt in rpcb_getport_async()

PATCH New [email protected] 1 participant 1 message Mar 27, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SUNRPC: Use the already looked-up xprt in rpcb_getport_async()

From: Bryan Schumaker <[email protected]>

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.

---
 net/sunrpc/rpcb_clnt.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/rpcb_clnt.c +1 -1
index 4f8af63..4cb71df 100644
@@ -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) {
Signature · 1 line
1.7.9.4