diff options
author | Sukadev Bhattiprolu <sukadev@us.ibm.com> | 2007-05-11 09:22:58 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-11 19:29:35 +0400 |
commit | e713d0dab21a68500720e222fa02567fc7dfb14b (patch) | |
tree | a56f90ce94d9287b73da6db72ed0e73542a70a07 /kernel/sys.c | |
parent | 4ac24b3ba9016881b11646114bb5cd12cf23edd9 (diff) | |
download | linux-e713d0dab21a68500720e222fa02567fc7dfb14b.tar.xz |
attach_pid() with struct pid parameter
attach_pid() currently takes a pid_t and then uses find_pid() to find the
corresponding struct pid. Sometimes we already have the struct pid. We can
then skip find_pid() if attach_pid() were to take a struct pid parameter.
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index df4c3a8f5df9..872271ccc384 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1488,7 +1488,7 @@ asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) if (process_group(p) != pgid) { detach_pid(p, PIDTYPE_PGID); p->signal->pgrp = pgid; - attach_pid(p, PIDTYPE_PGID, pgid); + attach_pid(p, PIDTYPE_PGID, find_pid(pgid)); } err = 0; |