Skip to content

Commit

Permalink
zap_other_threads: don't optimize thread_group_empty() case
Browse files Browse the repository at this point in the history
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: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Oct 17, 2007
1 parent 3ae4cba commit ebca4cd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,6 @@ void zap_other_threads(struct task_struct *p)
p->signal->flags = SIGNAL_GROUP_EXIT;
p->signal->group_stop_count = 0;

if (thread_group_empty(p))
return;

for (t = next_thread(p); t != p; t = next_thread(t)) {
/*
* Don't bother with already dead threads
Expand Down

0 comments on commit ebca4cd

Please sign in to comment.