aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2007-12-06 16:24:39 -0500
committerMatthew Wilcox <willy@linux.intel.com>2007-12-06 17:40:25 -0500
commit150030b78a454ba50d5e267b0dcf01b162809192 (patch)
tree4de766e7abbfd73a052f14f8efd3a26eb7b59d87 /net/sunrpc/sched.c
parent009e577e079656d51d0fe9b15e61e41b00816c29 (diff)
NFS: Switch from intr mount option to TASK_KILLABLE
By using the TASK_KILLABLE infrastructure, we can get rid of the 'intr' mount option. We have to use _killable everywhere instead of _interruptible as we get rid of rpc_clnt_sigmask/sigunmask. Signed-off-by: Liam R. Howlett <howlett@gmail.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
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 c98873f39aec..4b22910b4461 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(rpc_init_wait_queue); 246EXPORT_SYMBOL(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(__rpc_wait_for_completion_task); 306EXPORT_SYMBOL(__rpc_wait_for_completion_task);
307 307
@@ -690,10 +690,9 @@ static void __rpc_execute(struct rpc_task *task)
690 690
691 /* sync task: sleep here */ 691 /* sync task: sleep here */
692 dprintk("RPC: %5u sync task going to sleep\n", task->tk_pid); 692 dprintk("RPC: %5u sync task going to sleep\n", task->tk_pid);
693 /* Note: Caller should be using rpc_clnt_sigmask() */
694 status = out_of_line_wait_on_bit(&task->tk_runstate, 693 status = out_of_line_wait_on_bit(&task->tk_runstate,
695 RPC_TASK_QUEUED, rpc_wait_bit_interruptible, 694 RPC_TASK_QUEUED, rpc_wait_bit_killable,
696 TASK_INTERRUPTIBLE); 695 TASK_KILLABLE);
697 if (status == -ERESTARTSYS) { 696 if (status == -ERESTARTSYS) {
698 /* 697 /*
699 * When a sync task receives a signal, it exits with 698 * When a sync task receives a signal, it exits with
@@ -837,8 +836,6 @@ void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, int flags, cons
837 kref_get(&clnt->cl_kref); 836 kref_get(&clnt->cl_kref);
838 if (clnt->cl_softrtry) 837 if (clnt->cl_softrtry)
839 task->tk_flags |= RPC_TASK_SOFT; 838 task->tk_flags |= RPC_TASK_SOFT;
840 if (!clnt->cl_intr)
841 task->tk_flags |= RPC_TASK_NOINTR;
842 } 839 }
843 840
844 BUG_ON(task->tk_ops == NULL); 841 BUG_ON(task->tk_ops == NULL);