From: "Paul E. McKenney" Combine a bit of redundant code between force_sig_info() and force_sig_specific(). Signed-off-by: paulmck@us.ibm.com Signed-off-by: Andrew Morton --- kernel/signal.c | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) diff -puN kernel/signal.c~remove-duplicate-code-in-signalc kernel/signal.c --- devel/kernel/signal.c~remove-duplicate-code-in-signalc 2005-10-23 15:53:16.000000000 -0700 +++ devel-akpm/kernel/signal.c 2005-10-23 15:53:31.000000000 -0700 @@ -877,11 +877,13 @@ force_sig_info(int sig, struct siginfo * int ret; spin_lock_irqsave(&t->sighand->siglock, flags); - if (sigismember(&t->blocked, sig) || t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) { + if (t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) { t->sighand->action[sig-1].sa.sa_handler = SIG_DFL; + } + if (sigismember(&t->blocked, sig)) { sigdelset(&t->blocked, sig); - recalc_sigpending_tsk(t); } + recalc_sigpending_tsk(t); ret = specific_send_sig_info(sig, info, t); spin_unlock_irqrestore(&t->sighand->siglock, flags); @@ -891,15 +893,7 @@ force_sig_info(int sig, struct siginfo * void force_sig_specific(int sig, struct task_struct *t) { - unsigned long int flags; - - spin_lock_irqsave(&t->sighand->siglock, flags); - if (t->sighand->action[sig-1].sa.sa_handler == SIG_IGN) - t->sighand->action[sig-1].sa.sa_handler = SIG_DFL; - sigdelset(&t->blocked, sig); - recalc_sigpending_tsk(t); - specific_send_sig_info(sig, SEND_SIG_FORCED, t); - spin_unlock_irqrestore(&t->sighand->siglock, flags); + force_sig_info(sig, SEND_SIG_FORCED, t); } /* _