diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-19 02:40:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:40 -0400 |
commit | 228ebcbe634a30aec35132ea4375721bcc41bec0 (patch) | |
tree | a875976fd5bde6e2f931aa235c34c88a2738493f /mm/migrate.c | |
parent | b488893a390edfe027bae7a46e9af8083e740668 (diff) |
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 <xemul@openvz.org>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Paul Menage <menage@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index c479357b5480..4d6ee03db946 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -925,8 +925,7 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages, | |||
925 | 925 | ||
926 | /* Find the mm_struct */ | 926 | /* Find the mm_struct */ |
927 | read_lock(&tasklist_lock); | 927 | read_lock(&tasklist_lock); |
928 | task = pid ? | 928 | task = pid ? find_task_by_vpid(pid) : current; |
929 | find_task_by_pid_ns(pid, current->nsproxy->pid_ns) : current; | ||
930 | if (!task) { | 929 | if (!task) { |
931 | read_unlock(&tasklist_lock); | 930 | read_unlock(&tasklist_lock); |
932 | return -ESRCH; | 931 | return -ESRCH; |