mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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
2e2ba22ea4
, 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>
This commit is contained in:
parent
52ee2dfdd4
commit
1b0f7ffd0e
5 changed files with 12 additions and 51 deletions
|
@ -1265,8 +1265,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
|
|||
p->signal->leader_pid = pid;
|
||||
tty_kref_put(p->signal->tty);
|
||||
p->signal->tty = tty_kref_get(current->signal->tty);
|
||||
set_task_pgrp(p, task_pgrp_nr(current));
|
||||
set_task_session(p, task_session_nr(current));
|
||||
attach_pid(p, PIDTYPE_PGID, task_pgrp(current));
|
||||
attach_pid(p, PIDTYPE_SID, task_session(current));
|
||||
list_add_tail_rcu(&p->tasks, &init_task.tasks);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue