Skip to content

Commit

Permalink
sched/core: Remove the pointless BUG_ON(!task) from wake_up_q()
Browse files Browse the repository at this point in the history
container_of() can never return NULL - so don't check for it pointlessly.

[ mingo: Twiddled the changelog. ]

Signed-off-by: Oleg Nesterov <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
oleg-nesterov authored and Ingo Molnar committed May 12, 2021
1 parent 02dbb72 commit 2b8ca1a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@ void wake_up_q(struct wake_q_head *head)
struct task_struct *task;

task = container_of(node, struct task_struct, wake_q);
BUG_ON(!task);
/* Task can safely be re-inserted now: */
node = node->next;
task->wake_q.next = NULL;
Expand Down

0 comments on commit 2b8ca1a

Please sign in to comment.