Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42502
b: refs/heads/master
c: 6d5fcb5
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Dec 6, 2006
1 parent 28ff2ef commit 4618a52
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbd5a1f9fc9fad0f8725812d91c51b052e847de8
refs/heads/master: 6d5fcb5a52bfd00eab3ba2c7ca890823388436ae
8 changes: 7 additions & 1 deletion trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,9 @@ void rpc_delay(struct rpc_task *task, unsigned long delay)
*/
static void rpc_prepare_task(struct rpc_task *task)
{
lock_kernel();
task->tk_ops->rpc_call_prepare(task, task->tk_calldata);
unlock_kernel();
}

/*
Expand All @@ -598,7 +600,9 @@ void rpc_exit_task(struct rpc_task *task)
{
task->tk_action = NULL;
if (task->tk_ops->rpc_call_done != NULL) {
lock_kernel();
task->tk_ops->rpc_call_done(task, task->tk_calldata);
unlock_kernel();
if (task->tk_action != NULL) {
WARN_ON(RPC_ASSASSINATED(task));
/* Always release the RPC slot and buffer memory */
Expand Down Expand Up @@ -651,9 +655,7 @@ static int __rpc_execute(struct rpc_task *task)
*/
save_callback=task->tk_callback;
task->tk_callback=NULL;
lock_kernel();
save_callback(task);
unlock_kernel();
}

/*
Expand All @@ -664,9 +666,7 @@ static int __rpc_execute(struct rpc_task *task)
if (!RPC_IS_QUEUED(task)) {
if (task->tk_action == NULL)
break;
lock_kernel();
task->tk_action(task);
unlock_kernel();
}

/*
Expand Down

0 comments on commit 4618a52

Please sign in to comment.