提交 2b8ca1a9 编写于 作者: O Oleg Nesterov 提交者: Ingo Molnar

sched/core: Remove the pointless BUG_ON(!task) from wake_up_q()

container_of() can never return NULL - so don't check for it pointlessly.

[ mingo: Twiddled the changelog. ]
Signed-off-by: NOleg Nesterov <oleg@redhat.com>
Signed-off-by: NIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210510161522.GA32644@redhat.com
上级 02dbb724
...@@ -585,7 +585,6 @@ void wake_up_q(struct wake_q_head *head) ...@@ -585,7 +585,6 @@ void wake_up_q(struct wake_q_head *head)
struct task_struct *task; struct task_struct *task;
task = container_of(node, struct task_struct, wake_q); task = container_of(node, struct task_struct, wake_q);
BUG_ON(!task);
/* Task can safely be re-inserted now: */ /* Task can safely be re-inserted now: */
node = node->next; node = node->next;
task->wake_q.next = NULL; task->wake_q.next = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册