[PATCH] remove unneeded sig->curr_target recalculation

From: Oleg Nesterov
Date: Sun Nov 27 2005 - 11:54:42 EST


This patch removes unneeded sig->curr_target recalculation under
'if (atomic_dec_and_test(&sig->count))' in __exit_signal().

When sig->count == 0 the signal can't be sent to this task and
next_thread(tsk) == tsk anyway.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- 2.6.15-rc2/kernel/signal.c~ 2005-11-23 19:17:35.000000000 +0300
+++ 2.6.15-rc2/kernel/signal.c 2005-11-27 22:50:46.000000000 +0300
@@ -355,8 +355,6 @@ void __exit_signal(struct task_struct *t
posix_cpu_timers_exit(tsk);
if (atomic_dec_and_test(&sig->count)) {
posix_cpu_timers_exit_group(tsk);
- if (tsk == sig->curr_target)
- sig->curr_target = next_thread(tsk);
tsk->signal = NULL;
spin_unlock(&sighand->siglock);
flush_sigqueue(&sig->shared_pending);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/