]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/sunrpc/sched.c
Merge tag 'for-linus-2019-09-27' of git://git.kernel.dk/linux-block
[linux.git] / net / sunrpc / sched.c
index 1f275aba786fce5e1a10331d50a1538d4c59e475..360afe153193c8b37563a8676505a8ef04f8cc9b 100644 (file)
@@ -541,33 +541,14 @@ rpc_wake_up_task_on_wq_queue_action_locked(struct workqueue_struct *wq,
        return NULL;
 }
 
-static void
-rpc_wake_up_task_on_wq_queue_locked(struct workqueue_struct *wq,
-               struct rpc_wait_queue *queue, struct rpc_task *task)
-{
-       rpc_wake_up_task_on_wq_queue_action_locked(wq, queue, task, NULL, NULL);
-}
-
 /*
  * Wake up a queued task while the queue lock is being held
  */
-static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue, struct rpc_task *task)
-{
-       rpc_wake_up_task_on_wq_queue_locked(rpciod_workqueue, queue, task);
-}
-
-/*
- * Wake up a task on a specific queue
- */
-void rpc_wake_up_queued_task_on_wq(struct workqueue_struct *wq,
-               struct rpc_wait_queue *queue,
-               struct rpc_task *task)
+static void rpc_wake_up_task_queue_locked(struct rpc_wait_queue *queue,
+                                         struct rpc_task *task)
 {
-       if (!RPC_IS_QUEUED(task))
-               return;
-       spin_lock(&queue->lock);
-       rpc_wake_up_task_on_wq_queue_locked(wq, queue, task);
-       spin_unlock(&queue->lock);
+       rpc_wake_up_task_on_wq_queue_action_locked(rpciod_workqueue, queue,
+                                                  task, NULL, NULL);
 }
 
 /*
@@ -930,8 +911,10 @@ static void __rpc_execute(struct rpc_task *task)
                /*
                 * Signalled tasks should exit rather than sleep.
                 */
-               if (RPC_SIGNALLED(task))
+               if (RPC_SIGNALLED(task)) {
+                       task->tk_rpc_status = -ERESTARTSYS;
                        rpc_exit(task, -ERESTARTSYS);
+               }
 
                /*
                 * The queue->lock protects against races with
@@ -967,6 +950,7 @@ static void __rpc_execute(struct rpc_task *task)
                         */
                        dprintk("RPC: %5u got signal\n", task->tk_pid);
                        set_bit(RPC_TASK_SIGNALLED, &task->tk_runstate);
+                       task->tk_rpc_status = -ERESTARTSYS;
                        rpc_exit(task, -ERESTARTSYS);
                }
                dprintk("RPC: %5u sync task resuming\n", task->tk_pid);