diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-10-18 16:01:06 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-12-06 10:46:30 -0500 |
commit | 6d5fcb5a52bfd00eab3ba2c7ca890823388436ae (patch) | |
tree | 3408c72a54ac64d68e0e0a505ebe3757f8e42fac /net/sunrpc/clnt.c | |
parent | bbd5a1f9fc9fad0f8725812d91c51b052e847de8 (diff) | |
download | lwn-6d5fcb5a52bfd00eab3ba2c7ca890823388436ae.tar.gz lwn-6d5fcb5a52bfd00eab3ba2c7ca890823388436ae.zip |
SUNRPC: Remove BKL around the RPC socket operations etc.
All internal RPC client operations should no longer depend on the BKL,
however lockd and NFS callbacks may still require it.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 37d345c04aa5..7d65e19550cc 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -27,6 +27,7 @@ #include <linux/types.h> #include <linux/mm.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include <linux/utsname.h> #include <linux/workqueue.h> @@ -823,8 +824,10 @@ call_encode(struct rpc_task *task) if (encode == NULL) return; + lock_kernel(); task->tk_status = rpcauth_wrap_req(task, encode, req, p, task->tk_msg.rpc_argp); + unlock_kernel(); if (task->tk_status == -ENOMEM) { /* XXX: Is this sane? */ rpc_delay(task, 3*HZ); @@ -1155,9 +1158,12 @@ call_decode(struct rpc_task *task) task->tk_action = rpc_exit_task; - if (decode) + if (decode) { + lock_kernel(); task->tk_status = rpcauth_unwrap_resp(task, decode, req, p, task->tk_msg.rpc_resp); + unlock_kernel(); + } dprintk("RPC: %4d call_decode result %d\n", task->tk_pid, task->tk_status); return; |