From 8990571eb573032c1192440febb17132074c5575 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Thu, 18 Oct 2007 23:40:19 -0700 Subject: Uninline find_pid etc set of functions The find_pid/_vpid/_pid_ns functions are used to find the struct pid by its id, depending on whic id - global or virtual - is used. The find_vpid() is a macro that pushes the current->nsproxy->pid_ns on the stack to call another function - find_pid_ns(). It turned out, that this dereference together with the push itself cause the kernel text size to grow too much. Move all these out-of-line. Together with the previous patch this saves a bit less that 400 bytes from .text section. Signed-off-by: Pavel Emelyanov Cc: Sukadev Bhattiprolu Cc: Oleg Nesterov Cc: Paul Menage Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pid.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/linux/pid.h') diff --git a/include/linux/pid.h b/include/linux/pid.h index 4817c6671e77..e29a900a8499 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -110,9 +110,8 @@ extern struct pid_namespace init_pid_ns; * see also find_task_by_pid() set in include/linux/sched.h */ extern struct pid *FASTCALL(find_pid_ns(int nr, struct pid_namespace *ns)); - -#define find_vpid(pid) find_pid_ns(pid, current->nsproxy->pid_ns) -#define find_pid(pid) find_pid_ns(pid, &init_pid_ns) +extern struct pid *find_vpid(int nr); +extern struct pid *find_pid(int nr); /* * Lookup a PID in the hash table, and return with it's count elevated. -- cgit v1.2.3-59-g8ed1b