diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 13:16:20 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 16:07:03 -0400 |
commit | 5b616f5d596c0b056129f8aeafbc08409b3cd050 (patch) | |
tree | bdbd2eb5bd1f8a26c7287e21be25ec50db075459 /fs/lockd/mon.c | |
parent | 334ccfd545bba9690515f2c5c167d5adb161989b (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.c | 5 |
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 | ||
130 | out_destroy: | 130 | out_err: |
131 | xprt_destroy(xprt); | ||
132 | return clnt; | 131 | return clnt; |
133 | } | 132 | } |
134 | 133 | ||