Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0c12b51712ced2c0d89a8ec3d546ed810f86d33e
Commit:     0c12b51712ced2c0d89a8ec3d546ed810f86d33e
Parent:     b963a8441cb95999c97bea379607071a869c65f0
Author:     Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 01:44:56 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 10:51:26 2007 -0800

    [PATCH] kill_pid_info: kill acquired_tasklist_lock
    
    Kill acquired_tasklist_lock, sig_needs_tasklist() is very cheap nowadays.
    
    Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/signal.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 5630255..ea4632b 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1119,19 +1119,18 @@ kill_pg_info(int sig, struct siginfo *info, pid_t pgrp)
 int kill_pid_info(int sig, struct siginfo *info, struct pid *pid)
 {
        int error;
-       int acquired_tasklist_lock = 0;
        struct task_struct *p;
 
        rcu_read_lock();
-       if (unlikely(sig_needs_tasklist(sig))) {
+       if (unlikely(sig_needs_tasklist(sig)))
                read_lock(&tasklist_lock);
-               acquired_tasklist_lock = 1;
-       }
+
        p = pid_task(pid, PIDTYPE_PID);
        error = -ESRCH;
        if (p)
                error = group_send_sig_info(sig, info, p);
-       if (unlikely(acquired_tasklist_lock))
+
+       if (unlikely(sig_needs_tasklist(sig)))
                read_unlock(&tasklist_lock);
        rcu_read_unlock();
        return error;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to