]> err.no Git - linux-2.6/commitdiff
zap_other_threads: don't optimize thread_group_empty() case
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 17 Oct 2007 06:26:59 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:51 +0000 (08:42 -0700)
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>
kernel/signal.c

index 2f7736ff74188f0891c971b2151bc8da1af77b9e..b7aa492e16adf513d8917daacbbd230da9454dc3 100644 (file)
@@ -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