summaryrefslogtreecommitdiff
path: root/fs/lockd/host.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 17:16:20 +0000
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:03 -0400
commit5b616f5d596c0b056129f8aeafbc08409b3cd050 (patch)
treebdbd2eb5bd1f8a26c7287e21be25ec50db075459 /fs/lockd/host.c
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/lockd/host.c')
-rw-r--r--fs/lockd/host.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 52707c5ad6ea..90a62f27914c 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -193,10 +193,8 @@ nlm_bind_host(struct nlm_host *host)
/* Existing NLM servers accept AUTH_UNIX only */
clnt = rpc_create_client(xprt, host->h_name, &nlm_program,
host->h_version, RPC_AUTH_UNIX);
- if (IS_ERR(clnt)) {
- xprt_destroy(xprt);
+ if (IS_ERR(clnt))
goto forgetit;
- }
clnt->cl_autobind = 1; /* turn on pmap queries */
xprt->nocong = 1; /* No congestion control for NLM */
xprt->resvport = 1; /* NLM requires a reserved port */