Skip to content

Commit 6b5f590

Browse files
author
Trond Myklebust
committed
SUNRPC: Remove redundant calls to RPC_IS_QUEUED()
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>
1 parent cea5778 commit 6b5f590

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

net/sunrpc/clnt.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt)
833833
if (!(rovr->tk_flags & RPC_TASK_KILLED)) {
834834
rovr->tk_flags |= RPC_TASK_KILLED;
835835
rpc_exit(rovr, -EIO);
836-
if (RPC_IS_QUEUED(rovr))
837-
rpc_wake_up_queued_task(rovr->tk_waitqueue,
838-
rovr);
839836
}
840837
}
841838
spin_unlock(&clnt->cl_lock);

net/sunrpc/sched.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,7 @@ void rpc_exit(struct rpc_task *task, int status)
785785
{
786786
task->tk_status = status;
787787
task->tk_action = rpc_exit_task;
788-
if (RPC_IS_QUEUED(task))
789-
rpc_wake_up_queued_task(task->tk_waitqueue, task);
788+
rpc_wake_up_queued_task(task->tk_waitqueue, task);
790789
}
791790
EXPORT_SYMBOL_GPL(rpc_exit);
792791

0 commit comments

Comments
 (0)