From: sukadev@us.ibm.com
To: Andrew Morton <akpm@osdl.org>
Cc: Cedric Le Goater <clg@fr.ibm.com>,
Dave Hansen <haveblue@us.ibm.com>,
Serge Hallyn <serue@us.ibm.com>,
Eric Biederman <ebiederm@xmission.com>,
Herbert Poetzl <herbert@13thfloor.at>,
containers@lists.osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] Use task_pgrp() task_session() in copy_process()
Date: Mon, 12 Mar 2007 21:45:46 -0700 [thread overview]
Message-ID: <20070313044546.GE8884@us.ibm.com> (raw)
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [PATCH 5/5] Use task_pgrp() task_session() in copy_process().
Use task_pgrp() and task_session() in copy_process(), and
avoid find_pid() call when attaching the task to its process
group and session.
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: containers@lists.osdl.org
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
---
kernel/fork.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
Index: lx26-21-rc3-mm2/kernel/fork.c
===================================================================
--- lx26-21-rc3-mm2.orig/kernel/fork.c 2007-03-12 17:18:03.000000000 -0700
+++ lx26-21-rc3-mm2/kernel/fork.c 2007-03-12 17:18:11.000000000 -0700
@@ -1252,14 +1252,11 @@ static struct task_struct *copy_process(
tracehook_init_task(p);
if (thread_group_leader(p)) {
- pid_t pgid = process_group(current);
- pid_t sid = process_session(current);
-
p->signal->tty = current->signal->tty;
- p->signal->pgrp = pgid;
+ p->signal->pgrp = process_group(current);
set_signal_session(p->signal, process_session(current));
- attach_pid(p, PIDTYPE_PGID, find_pid(pgid));
- attach_pid(p, PIDTYPE_SID, find_pid(sid));
+ 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);
__get_cpu_var(process_counts)++;
reply other threads:[~2007-03-13 4:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070313044546.GE8884@us.ibm.com \
--to=sukadev@us.ibm.com \
--cc=akpm@osdl.org \
--cc=clg@fr.ibm.com \
--cc=containers@lists.osdl.org \
--cc=ebiederm@xmission.com \
--cc=haveblue@us.ibm.com \
--cc=herbert@13thfloor.at \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox