Commit 8ad7c892 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Make rpc_clone take a reference instead of using cl_count

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 90c5755f
...@@ -279,7 +279,7 @@ rpc_clone_client(struct rpc_clnt *clnt) ...@@ -279,7 +279,7 @@ rpc_clone_client(struct rpc_clnt *clnt)
if (err != 0) if (err != 0)
goto out_no_path; goto out_no_path;
new->cl_parent = clnt; new->cl_parent = clnt;
atomic_inc(&clnt->cl_count); kref_get(&clnt->cl_kref);
new->cl_xprt = xprt_get(clnt->cl_xprt); new->cl_xprt = xprt_get(clnt->cl_xprt);
/* Turn off autobind on clones */ /* Turn off autobind on clones */
new->cl_autobind = 0; new->cl_autobind = 0;
...@@ -337,7 +337,7 @@ rpc_free_client(struct kref *kref) ...@@ -337,7 +337,7 @@ rpc_free_client(struct kref *kref)
rpc_put_mount(); rpc_put_mount();
} }
if (clnt->cl_parent != clnt) { if (clnt->cl_parent != clnt) {
rpc_destroy_client(clnt->cl_parent); rpc_release_client(clnt->cl_parent);
goto out_free; goto out_free;
} }
if (clnt->cl_server != clnt->cl_inline_name) if (clnt->cl_server != clnt->cl_inline_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment