diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2007-10-19 08:40:16 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 20:53:40 +0200 |
commit | 228ebcbe634a30aec35132ea4375721bcc41bec0 (patch) | |
tree | a875976fd5bde6e2f931aa235c34c88a2738493f /fs/ioprio.c | |
parent | pid namespaces: changes to show virtual ids to user (diff) | |
download | linux-228ebcbe634a30aec35132ea4375721bcc41bec0.tar.xz linux-228ebcbe634a30aec35132ea4375721bcc41bec0.zip |
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 'fs/ioprio.c')
-rw-r--r-- | fs/ioprio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c index 0a615f87142e..d6ff77e8e7ec 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c @@ -94,8 +94,7 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio) if (!who) p = current; else - p = find_task_by_pid_ns(who, - current->nsproxy->pid_ns); + p = find_task_by_vpid(who); if (p) ret = set_task_ioprio(p, ioprio); break; @@ -182,8 +181,7 @@ asmlinkage long sys_ioprio_get(int which, int who) if (!who) p = current; else - p = find_task_by_pid_ns(who, - current->nsproxy->pid_ns); + p = find_task_by_vpid(who); if (p) ret = get_task_ioprio(p); break; |