Skip to content

Commit

Permalink
SUNRPC: Make rpc_clone take a reference instead of using cl_count
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jul 11, 2007
1 parent 90c5755 commit 8ad7c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ rpc_clone_client(struct rpc_clnt *clnt)
if (err != 0)
goto out_no_path;
new->cl_parent = clnt;
atomic_inc(&clnt->cl_count);
kref_get(&clnt->cl_kref);
new->cl_xprt = xprt_get(clnt->cl_xprt);
/* Turn off autobind on clones */
new->cl_autobind = 0;
Expand Down Expand Up @@ -337,7 +337,7 @@ rpc_free_client(struct kref *kref)
rpc_put_mount();
}
if (clnt->cl_parent != clnt) {
rpc_destroy_client(clnt->cl_parent);
rpc_release_client(clnt->cl_parent);
goto out_free;
}
if (clnt->cl_server != clnt->cl_inline_name)
Expand Down

0 comments on commit 8ad7c89

Please sign in to comment.