aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r--net/sunrpc/sched.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 40ce6f6672d6..4c669121e607 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -245,9 +245,9 @@ void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname)
245} 245}
246EXPORT_SYMBOL_GPL(rpc_init_wait_queue); 246EXPORT_SYMBOL_GPL(rpc_init_wait_queue);
247 247
248static int rpc_wait_bit_interruptible(void *word) 248static int rpc_wait_bit_killable(void *word)
249{ 249{
250 if (signal_pending(current)) 250 if (fatal_signal_pending(current))
251 return -ERESTARTSYS; 251 return -ERESTARTSYS;
252 schedule(); 252 schedule();
253 return 0; 253 return 0;
@@ -299,9 +299,9 @@ static void rpc_mark_complete_task(struct rpc_task *task)
299int __rpc_wait_for_completion_task(struct rpc_task *task, int (*action)(void *)) 299int __rpc_wait_for_completion_task(struct rpc_task *task, int (*action)(void *))
300{ 300{
301 if (action == NULL) 301 if (action == NULL)
302 action = rpc_wait_bit_interruptible; 302 action = rpc_wait_bit_killable;
303 return wait_on_bit(&task->tk_runstate, RPC_TASK_ACTIVE, 303 return wait_on_bit(&task->tk_runstate, RPC_TASK_ACTIVE,
304 action, TASK_INTERRUPTIBLE); 304 action, TASK_KILLABLE);
305} 305}
306EXPORT_SYMBOL_GPL(__rpc_wait_for_completion_task); 306EXPORT_SYMBOL_GPL(__rpc_wait_for_completion_task);
307 307
@@ -696,10 +696,9 @@ static void __rpc_execute(struct rpc_task *task)
696 696
697 /* sync task: sleep here */ 697 /* sync task: sleep here */
698 dprintk("RPC: %5u sync task going to sleep\n", task->tk_pid); 698 dprintk("RPC: %5u sync task going to sleep\n", task->tk_pid);
699 /* Note: Caller should be using rpc_clnt_sigmask() */
700 status = out_of_line_wait_on_bit(&task->tk_runstate, 699 status = out_of_line_wait_on_bit(&task->tk_runstate,
701 RPC_TASK_QUEUED, rpc_wait_bit_interruptible, 700 RPC_TASK_QUEUED, rpc_wait_bit_killable,
702 TASK_INTERRUPTIBLE); 701 TASK_KILLABLE);
703 if (status == -ERESTARTSYS) { 702 if (status == -ERESTARTSYS) {
704 /* 703 /*
705 * When a sync task receives a signal, it exits with 704 * When a sync task receives a signal, it exits with
@@ -840,8 +839,6 @@ static void rpc_init_task(struct rpc_task *task, const struct rpc_task_setup *ta
840 kref_get(&task->tk_client->cl_kref); 839 kref_get(&task->tk_client->cl_kref);
841 if (task->tk_client->cl_softrtry) 840 if (task->tk_client->cl_softrtry)
842 task->tk_flags |= RPC_TASK_SOFT; 841 task->tk_flags |= RPC_TASK_SOFT;
843 if (!task->tk_client->cl_intr)
844 task->tk_flags |= RPC_TASK_NOINTR;
845 } 842 }
846 843
847 if (task->tk_ops->rpc_call_prepare != NULL) 844 if (task->tk_ops->rpc_call_prepare != NULL)