Skip to contentSkip to conversation

remove unneeded sig->curr_target recalculation

PATCH New Oleg Nesterov 1 participant 1 message Nov 27, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove unneeded sig->curr_target recalculation

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.

kernel/signal.c renamed from kernel/signal.c~ +0 -2
@@ -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);