Merge tag 'nfs-for-6.1-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
[platform/kernel/linux-rpi.git] / net / sunrpc / sched.c
index de912e0..be587a3 100644 (file)
@@ -276,7 +276,7 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);
 
 static int rpc_wait_bit_killable(struct wait_bit_key *key, int mode)
 {
-       freezable_schedule_unsafe();
+       schedule();
        if (signal_pending_state(mode, current))
                return -ERESTARTSYS;
        return 0;
@@ -340,14 +340,12 @@ static int rpc_complete_task(struct rpc_task *task)
  * to enforce taking of the wq->lock and hence avoid races with
  * rpc_complete_task().
  */
-int __rpc_wait_for_completion_task(struct rpc_task *task, wait_bit_action_f *action)
+int rpc_wait_for_completion_task(struct rpc_task *task)
 {
-       if (action == NULL)
-               action = rpc_wait_bit_killable;
        return out_of_line_wait_on_bit(&task->tk_runstate, RPC_TASK_ACTIVE,
-                       action, TASK_KILLABLE);
+                       rpc_wait_bit_killable, TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
 }
-EXPORT_SYMBOL_GPL(__rpc_wait_for_completion_task);
+EXPORT_SYMBOL_GPL(rpc_wait_for_completion_task);
 
 /*
  * Make an RPC task runnable.
@@ -988,7 +986,7 @@ static void __rpc_execute(struct rpc_task *task)
                trace_rpc_task_sync_sleep(task, task->tk_action);
                status = out_of_line_wait_on_bit(&task->tk_runstate,
                                RPC_TASK_QUEUED, rpc_wait_bit_killable,
-                               TASK_KILLABLE);
+                               TASK_KILLABLE|TASK_FREEZABLE);
                if (status < 0) {
                        /*
                         * When a sync task receives a signal, it exits with