aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/host.c
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/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)
193 /* Existing NLM servers accept AUTH_UNIX only */ 193 /* Existing NLM servers accept AUTH_UNIX only */
194 clnt = rpc_create_client(xprt, host->h_name, &nlm_program, 194 clnt = rpc_create_client(xprt, host->h_name, &nlm_program,
195 host->h_version, RPC_AUTH_UNIX); 195 host->h_version, RPC_AUTH_UNIX);
196 if (IS_ERR(clnt)) { 196 if (IS_ERR(clnt))
197 xprt_destroy(xprt);
198 goto forgetit; 197 goto forgetit;
199 }
200 clnt->cl_autobind = 1; /* turn on pmap queries */ 198 clnt->cl_autobind = 1; /* turn on pmap queries */
201 xprt->nocong = 1; /* No congestion control for NLM */ 199 xprt->nocong = 1; /* No congestion control for NLM */
202 xprt->resvport = 1; /* NLM requires a reserved port */ 200 xprt->resvport = 1; /* NLM requires a reserved port */