Commit ebca4cda authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

zap_other_threads: don't optimize thread_group_empty() case

Nowadays thread_group_empty() and next_thread() are simple list operations,
this optimization doesn't make sense: we are doing exactly same check one
line below.
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Acked-by: default avatarRoland McGrath <roland@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3ae4cbad
...@@ -985,9 +985,6 @@ void zap_other_threads(struct task_struct *p) ...@@ -985,9 +985,6 @@ void zap_other_threads(struct task_struct *p)
p->signal->flags = SIGNAL_GROUP_EXIT; p->signal->flags = SIGNAL_GROUP_EXIT;
p->signal->group_stop_count = 0; p->signal->group_stop_count = 0;
if (thread_group_empty(p))
return;
for (t = next_thread(p); t != p; t = next_thread(t)) { for (t = next_thread(p); t != p; t = next_thread(t)) {
/* /*
* Don't bother with already dead threads * Don't bother with already dead threads
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment