mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
4ac24b3ba9
commit
e713d0dab2
6 changed files with 18 additions and 13 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue