diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-14 17:26:17 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:30 -0400 |
commit | 4ada539ed77c7a2bbcb75cafbbd7bd8d2b9bef7b (patch) | |
tree | cb4ba7df88aee07173dc7e44a3c35249ae4ab539 /net/sunrpc/clnt.c | |
parent | ab418d70e1fceda1e2824c45ba3323a1b1413507 (diff) |
SUNRPC: Make create_client() take a reference to the rpciod workqueue
Ensures that an rpc_client always has the possibility to send asynchronous
RPC calls.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
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 dprintk("RPC: creating %s client for %s (xprt %p)\n", program->name, servname, xprt); + err = rpciod_up(); + if (err) + goto out_no_rpciod; err = -EINVAL; if (!xprt) goto out_no_xprt; @@ -191,6 +194,8 @@ out_no_stats: out_err: xprt_put(xprt); out_no_xprt: + rpciod_down(); +out_no_rpciod: return ERR_PTR(err); } @@ -287,6 +292,7 @@ rpc_clone_client(struct rpc_clnt *clnt) xprt_get(clnt->cl_xprt); kref_get(&clnt->cl_kref); rpc_register_client(new); + rpciod_up(); return new; out_no_path: rpc_free_iostats(new->cl_metrics); @@ -344,6 +350,7 @@ out_free: rpc_free_iostats(clnt->cl_metrics); clnt->cl_metrics = NULL; xprt_put(clnt->cl_xprt); + rpciod_down(); kfree(clnt); } |