aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-04-02 19:58:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-02 22:05:02 -0400
commit1b0f7ffd0ea27cd3a0b9ca04e3df9522048c32a3 (patch)
treea8c27acdf95f55f93fe86661c6cba4cd36c8e4f1 /drivers/char
parent52ee2dfdd4f51cf422ea6a96a0846dc94244aa37 (diff)
pids: kill signal_struct-> __pgrp/__session and friends
We are wasting 2 words in signal_struct without any reason to implement task_pgrp_nr() and task_session_nr(). task_session_nr() has no callers since 2e2ba22ea4fd4bb85f0fa37c521066db6775cbef, we can remove it. task_pgrp_nr() is still (I believe wrongly) used in fs/autofsX and fs/coda. This patch reimplements task_pgrp_nr() via task_pgrp_nr_ns(), and kills __pgrp/__session and the related helpers. The change in drivers/char/tty_io.c is cosmetic, but hopefully makes sense anyway. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Alan Cox <number6@the-village.bc.nu> [tty parts] Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tty_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index a44b701c5bba..66b99a2049e3 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2681,7 +2681,7 @@ void __do_SAK(struct tty_struct *tty)
2681 /* Kill the entire session */ 2681 /* Kill the entire session */
2682 do_each_pid_task(session, PIDTYPE_SID, p) { 2682 do_each_pid_task(session, PIDTYPE_SID, p) {
2683 printk(KERN_NOTICE "SAK: killed process %d" 2683 printk(KERN_NOTICE "SAK: killed process %d"
2684 " (%s): task_session_nr(p)==tty->session\n", 2684 " (%s): task_session(p)==tty->session\n",
2685 task_pid_nr(p), p->comm); 2685 task_pid_nr(p), p->comm);
2686 send_sig(SIGKILL, p, 1); 2686 send_sig(SIGKILL, p, 1);
2687 } while_each_pid_task(session, PIDTYPE_SID, p); 2687 } while_each_pid_task(session, PIDTYPE_SID, p);
@@ -2691,7 +2691,7 @@ void __do_SAK(struct tty_struct *tty)
2691 do_each_thread(g, p) { 2691 do_each_thread(g, p) {
2692 if (p->signal->tty == tty) { 2692 if (p->signal->tty == tty) {
2693 printk(KERN_NOTICE "SAK: killed process %d" 2693 printk(KERN_NOTICE "SAK: killed process %d"
2694 " (%s): task_session_nr(p)==tty->session\n", 2694 " (%s): task_session(p)==tty->session\n",
2695 task_pid_nr(p), p->comm); 2695 task_pid_nr(p), p->comm);
2696 send_sig(SIGKILL, p, 1); 2696 send_sig(SIGKILL, p, 1);
2697 continue; 2697 continue;