aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 13:16:20 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:03 -0400
commit5b616f5d596c0b056129f8aeafbc08409b3cd050 (patch)
treebdbd2eb5bd1f8a26c7287e21be25ec50db075459 /fs/nfsd
parent334ccfd545bba9690515f2c5c167d5adb161989b (diff)
[PATCH] RPC: Make rpc_create_client() destroy the transport on failure.
This saves us a couple of lines of cleanup code for each call. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4callback.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 1a55dfcb74bc..634465e9cfc6 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -430,7 +430,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
430 clnt = rpc_create_client(xprt, hostname, program, 1, RPC_AUTH_UNIX); 430 clnt = rpc_create_client(xprt, hostname, program, 1, RPC_AUTH_UNIX);
431 if (IS_ERR(clnt)) { 431 if (IS_ERR(clnt)) {
432 dprintk("NFSD: couldn't create callback client\n"); 432 dprintk("NFSD: couldn't create callback client\n");
433 goto out_xprt; 433 goto out_err;
434 } 434 }
435 clnt->cl_intr = 0; 435 clnt->cl_intr = 0;
436 clnt->cl_softrtry = 1; 436 clnt->cl_softrtry = 1;
@@ -465,8 +465,6 @@ out_rpciod:
465out_clnt: 465out_clnt:
466 rpc_shutdown_client(clnt); 466 rpc_shutdown_client(clnt);
467 goto out_err; 467 goto out_err;
468out_xprt:
469 xprt_destroy(xprt);
470out_err: 468out_err:
471 dprintk("NFSD: warning: no callback path to client %.*s\n", 469 dprintk("NFSD: warning: no callback path to client %.*s\n",
472 (int)clp->cl_name.len, clp->cl_name.data); 470 (int)clp->cl_name.len, clp->cl_name.data);