OpenVZ Forum - RDF feed
type: channel
items: [PATCH] Remove find_attach_pid()

[PATCH] Remove find_attach_pid()
type: item
description: As Eric Biederman pointed out, find_attach_pid() is not really necessary. --- From: Sukadev Bhattiprolu <sukadev@us.ibm.com> Remove find_attach_pid() interface and have callers of attach_pid() pass in a struct pid. Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: containers@lists.osdl.org --- fs/exec.c | 2 +- include/linux/pid.h | 11 ++--------- kernel/exit.c | 4 ++-- kernel/fork.c | 13 ++++++++----- kernel/pid.c | 6 ++++++ kernel/sys.c | 2 +- 6 files changed, 20 insertions(+), 18 deletions(-) Index: lx26-20-rc2-mm1/fs/exec.c =================================================================== --- lx26-20-rc2-mm1.orig/fs/exec.c 2007-01-10 21:42:43.000000000 -0800 +++ lx26-20-rc2-mm1/fs/exec.c 2007-01-11 19:06:00.260386560 -0800 @@ -701,7 +701,7 @@ static int de_thread(struct task_struct */ detach_pid(tsk, PIDTYPE_PID); tsk->pid = leader->pid; - find_attach_pid(tsk, PIDTYPE_PID, tsk->pid); + attach_pid(tsk, PIDTYPE_PID, find_pid(tsk->pid)); transfer_pid(leader, tsk, PIDTYPE_PGID); transfer_pid(leader, tsk, PIDTYPE_SID); list_replace_rcu(&leader->tasks, &tsk->tasks); Index: lx26-20-rc2-mm1/kernel/exit.c =================================================================== --- lx26-20-rc2-mm1.orig/kernel/exit.c 2007-01-10 21:43:09.000000000 -0800 +++ lx26-20-rc2-mm1/kernel/exit.c 2007-01-11 18:36:34.000000000 -0800 @@ -301,12 +301,12 @@ void __set_special_pids(pid_t session, p if (process_session(curr) != session) { detach_pid(curr, PIDTYPE_SID); set_signal_session(curr->signal, session); - find_attach_pid(curr, PIDTYPE_SID, session); + attach_pid(curr, PIDTYPE_SID, find_pid(session)); } if (process_group(curr) != pgrp) { detach_pid(curr, PIDTYPE_PGID); curr->signal->pgrp = pgrp; - find_attach_pid(curr, PIDTYPE_PGID, pgrp); + attach_pid(curr, PIDTYPE_PGID, find_pid(pgrp)); } } Index: lx26-20-rc2-mm1/kernel…
creator: Sukadev Bhattiprolu
date: 2007-01-12T03:27:43-00:00