mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Uninline find_task_by_xxx set of functions
The find_task_by_something is a set of macros are used to find task by pid depending on what kind of pid is proposed - global or virtual one. All of them are wrappers above the most generic one - find_task_by_pid_type_ns() - and just substitute some args for it. It turned out, that dereferencing the current->nsproxy->pid_ns construction and pushing one more argument on the stack inline cause kernel text size to grow. This patch moves all this stuff out-of-line into kernel/pid.c. Together with the next patch it saves a bit less than 400 bytes from the .text section. Signed-off-by: Pavel Emelyanov <[email protected]> Cc: Sukadev Bhattiprolu <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Paul Menage <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
b488893a39
commit
228ebcbe63
12 changed files with 41 additions and 38 deletions
|
|
@ -925,8 +925,7 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
|
|||
|
||||
/* Find the mm_struct */
|
||||
read_lock(&tasklist_lock);
|
||||
task = pid ?
|
||||
find_task_by_pid_ns(pid, current->nsproxy->pid_ns) : current;
|
||||
task = pid ? find_task_by_vpid(pid) : current;
|
||||
if (!task) {
|
||||
read_unlock(&tasklist_lock);
|
||||
return -ESRCH;
|
||||
|
|
|
|||
Loading…
Reference in a new issue