mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04: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 <[email protected]> Cc: Cedric Le Goater <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4ac24b3ba9
commit
e713d0dab2
6 changed files with 18 additions and 13 deletions
|
|
@ -702,7 +702,7 @@ static int de_thread(struct task_struct *tsk)
|
|||
*/
|
||||
detach_pid(tsk, PIDTYPE_PID);
|
||||
tsk->pid = leader->pid;
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue