]> git.baikalelectronics.ru Git - kernel.git/commitdiff
SUNRPC: Remove redundant calls to RPC_IS_QUEUED()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Mar 2019 21:20:11 +0000 (16:20 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Mar 2019 21:22:58 +0000 (16:22 -0500)
The RPC task wakeup calls all check for RPC_IS_QUEUED() before taking any
locks. In addition, rpc_exit() already calls rpc_wake_up_queued_task().

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/clnt.c
net/sunrpc/sched.c

index a0e7322fc171453ad86dd002fe42ea395b16b06f..9cf63e6339f454699f9123a21c49569ab0185389 100644 (file)
@@ -833,9 +833,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
                if (!(rovr->tk_flags & RPC_TASK_KILLED)) {
                        rovr->tk_flags |= RPC_TASK_KILLED;
                        rpc_exit(rovr, -EIO);
-                       if (RPC_IS_QUEUED(rovr))
-                               rpc_wake_up_queued_task(rovr->tk_waitqueue,
-                                                       rovr);
                }
        }
        spin_unlock(&clnt->cl_lock);
index f21557213a43c90650aeb26a3425a4b14add65f1..28956c70100af03916fdcf19a520e7c784d1ba3b 100644 (file)
@@ -785,8 +785,7 @@ void rpc_exit(struct rpc_task *task, int status)
 {
        task->tk_status = status;
        task->tk_action = rpc_exit_task;
-       if (RPC_IS_QUEUED(task))
-               rpc_wake_up_queued_task(task->tk_waitqueue, task);
+       rpc_wake_up_queued_task(task->tk_waitqueue, task);
 }
 EXPORT_SYMBOL_GPL(rpc_exit);