提交 a3f6dfb7 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

do_wait: kill the old BUG_ON, use while_each_thread()

do_wait() does BUG_ON(tsk->signal != current->signal), this looks like a
raher obsolete check.  At least, I don't think do_wait() is the best place
to verify that all threads have the same ->signal.  Remove it.

Also, change the code to use while_each_thread().
Signed-off-by: NOleg Nesterov <oleg@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: NRoland McGrath <roland@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 64a16caf
......@@ -1595,9 +1595,7 @@ static long do_wait(struct wait_opts *wo)
if (wo->wo_flags & __WNOTHREAD)
break;
tsk = next_thread(tsk);
BUG_ON(tsk->signal != current->signal);
} while (tsk != current);
} while_each_thread(current, tsk);
read_unlock(&tasklist_lock);
notask:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册