aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-10-18 16:01:06 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-06 10:46:30 -0500
commit6d5fcb5a52bfd00eab3ba2c7ca890823388436ae (patch)
tree3408c72a54ac64d68e0e0a505ebe3757f8e42fac /net/sunrpc/clnt.c
parentbbd5a1f9fc9fad0f8725812d91c51b052e847de8 (diff)
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.c8
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 @@
27#include <linux/types.h> 27#include <linux/types.h>
28#include <linux/mm.h> 28#include <linux/mm.h>
29#include <linux/slab.h> 29#include <linux/slab.h>
30#include <linux/smp_lock.h>
30#include <linux/utsname.h> 31#include <linux/utsname.h>
31#include <linux/workqueue.h> 32#include <linux/workqueue.h>
32 33
@@ -823,8 +824,10 @@ call_encode(struct rpc_task *task)
823 if (encode == NULL) 824 if (encode == NULL)
824 return; 825 return;
825 826
827 lock_kernel();
826 task->tk_status = rpcauth_wrap_req(task, encode, req, p, 828 task->tk_status = rpcauth_wrap_req(task, encode, req, p,
827 task->tk_msg.rpc_argp); 829 task->tk_msg.rpc_argp);
830 unlock_kernel();
828 if (task->tk_status == -ENOMEM) { 831 if (task->tk_status == -ENOMEM) {
829 /* XXX: Is this sane? */ 832 /* XXX: Is this sane? */
830 rpc_delay(task, 3*HZ); 833 rpc_delay(task, 3*HZ);
@@ -1155,9 +1158,12 @@ call_decode(struct rpc_task *task)
1155 1158
1156 task->tk_action = rpc_exit_task; 1159 task->tk_action = rpc_exit_task;
1157 1160
1158 if (decode) 1161 if (decode) {
1162 lock_kernel();
1159 task->tk_status = rpcauth_unwrap_resp(task, decode, req, p, 1163 task->tk_status = rpcauth_unwrap_resp(task, decode, req, p,
1160 task->tk_msg.rpc_resp); 1164 task->tk_msg.rpc_resp);
1165 unlock_kernel();
1166 }
1161 dprintk("RPC: %4d call_decode result %d\n", task->tk_pid, 1167 dprintk("RPC: %4d call_decode result %d\n", task->tk_pid,
1162 task->tk_status); 1168 task->tk_status);
1163 return; 1169 return;