aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChuck Lever2013-03-22 11:52:59 -0500
committerGreg Kroah-Hartman2013-04-12 11:52:09 -0500
commit020dff84998201602ae4d00bd38acafc62f5c693 (patch)
treef374b0696f7fa9173ad72c460a1c2c29a0149f69 /net
parentc50130d1682d37baac4cec833a964b2c3eb83e9c (diff)
downloadkernel-video-020dff84998201602ae4d00bd38acafc62f5c693.tar.gz
kernel-video-020dff84998201602ae4d00bd38acafc62f5c693.tar.xz
kernel-video-020dff84998201602ae4d00bd38acafc62f5c693.zip
SUNRPC: Remove extra xprt_put()
commit a58e0be6f6b3eb2079b0b8fedc9df6fa86869f1e upstream. While testing error cases where rpc_new_client() fails, I saw some oopses. If rpc_new_client() fails, it already invokes xprt_put(). Thus __rpc_clone_client() does not need to invoke it again. Introduced by commit 1b63a751 "SUNRPC: Refactor rpc_clone_client()" Fri Sep 14, 2012. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/clnt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 507b5e84fbd..716aa41aa4d 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -511,7 +511,7 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
511 new = rpc_new_client(args, xprt); 511 new = rpc_new_client(args, xprt);
512 if (IS_ERR(new)) { 512 if (IS_ERR(new)) {
513 err = PTR_ERR(new); 513 err = PTR_ERR(new);
514 goto out_put; 514 goto out_err;
515 } 515 }
516 516
517 atomic_inc(&clnt->cl_count); 517 atomic_inc(&clnt->cl_count);
@@ -524,8 +524,6 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args,
524 new->cl_chatty = clnt->cl_chatty; 524 new->cl_chatty = clnt->cl_chatty;
525 return new; 525 return new;
526 526
527out_put:
528 xprt_put(xprt);
529out_err: 527out_err:
530 dprintk("RPC: %s: returned error %d\n", __func__, err); 528 dprintk("RPC: %s: returned error %d\n", __func__, err);
531 return ERR_PTR(err); 529 return ERR_PTR(err);