Skip to content

Commit

Permalink
[PATCH] remove unneeded sig->curr_target recalculation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jan 9, 2006
1 parent 08efd10 commit 86174cd
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,6 @@ void __exit_signal(struct task_struct *tsk)
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;
__exit_sighand(tsk);
spin_unlock(&sighand->siglock);
Expand Down

0 comments on commit 86174cd

Please sign in to comment.