From: Oleg Nesterov 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 --- kernel/signal.c | 3 --- 1 file changed, 3 deletions(-) diff -puN kernel/signal.c~zap_other_threads-dont-optimize-thread_group_empty-case kernel/signal.c --- a/kernel/signal.c~zap_other_threads-dont-optimize-thread_group_empty-case +++ a/kernel/signal.c @@ -986,9 +986,6 @@ void zap_other_threads(struct task_struc 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 _