diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-08-31 18:24:08 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-09-22 23:24:56 -0400 |
commit | 8014793b1b2869445adfe678d64cdacd10e99d53 (patch) | |
tree | 861968eb71efbeae9918b1f407be99a5e6aaa9d3 | |
parent | 297de4f65698ee1e1c75e27d57933b5fa8227e72 (diff) |
SUNRPC: rpc_delay() should not clobber the rpc_task->tk_status
Doing so prevents stuff like call_encode() from working correctly.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | net/sunrpc/sched.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index ecf366351bf7..6390461a9756 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -542,24 +542,20 @@ void rpc_wake_up_status(struct rpc_wait_queue *queue, int status) | |||
542 | spin_unlock_bh(&queue->lock); | 542 | spin_unlock_bh(&queue->lock); |
543 | } | 543 | } |
544 | 544 | ||
545 | static void __rpc_atrun(struct rpc_task *task) | ||
546 | { | ||
547 | rpc_wake_up_task(task); | ||
548 | } | ||
549 | |||
545 | /* | 550 | /* |
546 | * Run a task at a later time | 551 | * Run a task at a later time |
547 | */ | 552 | */ |
548 | static void __rpc_atrun(struct rpc_task *); | 553 | void rpc_delay(struct rpc_task *task, unsigned long delay) |
549 | void | ||
550 | rpc_delay(struct rpc_task *task, unsigned long delay) | ||
551 | { | 554 | { |
552 | task->tk_timeout = delay; | 555 | task->tk_timeout = delay; |
553 | rpc_sleep_on(&delay_queue, task, NULL, __rpc_atrun); | 556 | rpc_sleep_on(&delay_queue, task, NULL, __rpc_atrun); |
554 | } | 557 | } |
555 | 558 | ||
556 | static void | ||
557 | __rpc_atrun(struct rpc_task *task) | ||
558 | { | ||
559 | task->tk_status = 0; | ||
560 | rpc_wake_up_task(task); | ||
561 | } | ||
562 | |||
563 | /* | 559 | /* |
564 | * Helper to call task->tk_ops->rpc_call_prepare | 560 | * Helper to call task->tk_ops->rpc_call_prepare |
565 | */ | 561 | */ |