aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-16 14:17:01 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:28 -0400
commit4bef61ff7514396419563ca54fd42ef846485b06 (patch)
tree5ea7eca032557a8ae307661b8c2b887fac257476 /net/sunrpc/clnt.c
parent6529eba08fe7297852391a468d95322913de73fa (diff)
SUNRPC: Add a per-rpc_clnt spinlock
Use that to protect the rpc_clnt->cl_tasks list instead of using a global lock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 6631ece14983..424dfdc6862c 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -149,6 +149,7 @@ static struct rpc_clnt * rpc_new_client(struct rpc_xprt *xprt, char *servname, s
149 goto out_no_stats; 149 goto out_no_stats;
150 clnt->cl_program = program; 150 clnt->cl_program = program;
151 INIT_LIST_HEAD(&clnt->cl_tasks); 151 INIT_LIST_HEAD(&clnt->cl_tasks);
152 spin_lock_init(&clnt->cl_lock);
152 153
153 if (!xprt_bound(clnt->cl_xprt)) 154 if (!xprt_bound(clnt->cl_xprt))
154 clnt->cl_autobind = 1; 155 clnt->cl_autobind = 1;
@@ -286,6 +287,7 @@ rpc_clone_client(struct rpc_clnt *clnt)
286 new->cl_oneshot = 0; 287 new->cl_oneshot = 0;
287 new->cl_dead = 0; 288 new->cl_dead = 0;
288 INIT_LIST_HEAD(&new->cl_tasks); 289 INIT_LIST_HEAD(&new->cl_tasks);
290 spin_lock_init(&new->cl_lock);
289 rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); 291 rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
290 if (new->cl_auth) 292 if (new->cl_auth)
291 atomic_inc(&new->cl_auth->au_count); 293 atomic_inc(&new->cl_auth->au_count);