From: Oleg Nesterov Date: Wed, 17 Oct 2007 06:26:59 +0000 (-0700) Subject: zap_other_threads: don't optimize thread_group_empty() case X-Git-Tag: v2.6.24-rc1~706 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebca4cda1133775111e8b09f7124a7e5e391926d;p=linux-2.6 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: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/signal.c b/kernel/signal.c index 2f7736ff74..b7aa492e16 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -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