diff options
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 78bbb359281d..fe838e996ee3 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -111,6 +111,9 @@ static struct rpc_clnt * rpc_new_client(struct rpc_xprt *xprt, char *servname, s | |||
111 | dprintk("RPC: creating %s client for %s (xprt %p)\n", | 111 | dprintk("RPC: creating %s client for %s (xprt %p)\n", |
112 | program->name, servname, xprt); | 112 | program->name, servname, xprt); |
113 | 113 | ||
114 | err = rpciod_up(); | ||
115 | if (err) | ||
116 | goto out_no_rpciod; | ||
114 | err = -EINVAL; | 117 | err = -EINVAL; |
115 | if (!xprt) | 118 | if (!xprt) |
116 | goto out_no_xprt; | 119 | goto out_no_xprt; |
@@ -191,6 +194,8 @@ out_no_stats: | |||
191 | out_err: | 194 | out_err: |
192 | xprt_put(xprt); | 195 | xprt_put(xprt); |
193 | out_no_xprt: | 196 | out_no_xprt: |
197 | rpciod_down(); | ||
198 | out_no_rpciod: | ||
194 | return ERR_PTR(err); | 199 | return ERR_PTR(err); |
195 | } | 200 | } |
196 | 201 | ||
@@ -287,6 +292,7 @@ rpc_clone_client(struct rpc_clnt *clnt) | |||
287 | xprt_get(clnt->cl_xprt); | 292 | xprt_get(clnt->cl_xprt); |
288 | kref_get(&clnt->cl_kref); | 293 | kref_get(&clnt->cl_kref); |
289 | rpc_register_client(new); | 294 | rpc_register_client(new); |
295 | rpciod_up(); | ||
290 | return new; | 296 | return new; |
291 | out_no_path: | 297 | out_no_path: |
292 | rpc_free_iostats(new->cl_metrics); | 298 | rpc_free_iostats(new->cl_metrics); |
@@ -344,6 +350,7 @@ out_free: | |||
344 | rpc_free_iostats(clnt->cl_metrics); | 350 | rpc_free_iostats(clnt->cl_metrics); |
345 | clnt->cl_metrics = NULL; | 351 | clnt->cl_metrics = NULL; |
346 | xprt_put(clnt->cl_xprt); | 352 | xprt_put(clnt->cl_xprt); |
353 | rpciod_down(); | ||
347 | kfree(clnt); | 354 | kfree(clnt); |
348 | } | 355 | } |
349 | 356 | ||