aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/mon.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/mon.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/mon.c')
-rw-r--r--fs/lockd/mon.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 6fc1bebeec1d..81b5e7778d70 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -120,15 +120,14 @@ nsm_create(void)
120 &nsm_program, SM_VERSION, 120 &nsm_program, SM_VERSION,
121 RPC_AUTH_NULL); 121 RPC_AUTH_NULL);
122 if (IS_ERR(clnt)) 122 if (IS_ERR(clnt))
123 goto out_destroy; 123 goto out_err;
124 clnt->cl_softrtry = 1; 124 clnt->cl_softrtry = 1;
125 clnt->cl_chatty = 1; 125 clnt->cl_chatty = 1;
126 clnt->cl_oneshot = 1; 126 clnt->cl_oneshot = 1;
127 xprt->resvport = 1; /* NSM requires a reserved port */ 127 xprt->resvport = 1; /* NSM requires a reserved port */
128 return clnt; 128 return clnt;
129 129
130out_destroy: 130out_err:
131 xprt_destroy(xprt);
132 return clnt; 131 return clnt;
133} 132}
134 133