From: Trond Myklebust Date: Thu, 14 Jun 2007 20:40:32 +0000 (-0400) Subject: SUNRPC: Make rpc_clone take a reference instead of using cl_count X-Git-Tag: v2.6.23-rc1~1073^2~92 X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=8ad7c892e18ff8e6df422eb48ca0f73268ffd632;p=powerpc.git SUNRPC: Make rpc_clone take a reference instead of using cl_count Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 34662dfa9c..613c10e4ac 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -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; @@ -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)