summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-14 16:40:31 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:28 -0400
commit34f52e3591f241b825353ba27def956d8487c400 (patch)
tree9f7f0cd52f206095217bd2469e31c2531cbae0a4 /net/sunrpc/sched.c
parentc44fe705530ff9ea5e563bf9b65bdd29defe682b (diff)
downloadop-kernel-dev-34f52e3591f241b825353ba27def956d8487c400.zip
op-kernel-dev-34f52e3591f241b825353ba27def956d8487c400.tar.gz
SUNRPC: Convert rpc_clnt->cl_users to a kref
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r--net/sunrpc/sched.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 0e9fbbd..bb12983 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -846,7 +846,7 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons
task->tk_workqueue = rpciod_workqueue;
if (clnt) {
- atomic_inc(&clnt->cl_users);
+ kref_get(&clnt->cl_kref);
if (clnt->cl_softrtry)
task->tk_flags |= RPC_TASK_SOFT;
if (!clnt->cl_intr)
@@ -898,9 +898,7 @@ out:
cleanup:
/* Check whether to release the client */
if (clnt) {
- printk("rpc_new_task: failed, users=%d, oneshot=%d\n",
- atomic_read(&clnt->cl_users), clnt->cl_oneshot);
- atomic_inc(&clnt->cl_users); /* pretend we were used ... */
+ kref_get(&clnt->cl_kref); /* pretend we were used ... */
rpc_release_client(clnt);
}
goto out;
OpenPOWER on IntegriCloud