From e16885c5ad624a6efe1b1bf764e075d75f65a788 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 11 Jan 2006 12:17:45 -0800 Subject: [PATCH] uninline capable() Uninline capable(). Saves 2K of kernel text on a generic .config, and 1K on a tiny config. In addition it makes the use of capable more consistent between CONFIG_SECURITY and !CONFIG_SECURITY Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/sched.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'include/linux/sched.h') diff --git a/include/linux/sched.h b/include/linux/sched.h index c4ee35dd18a..2ae8711bfba 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1113,19 +1113,8 @@ static inline int sas_ss_flags(unsigned long sp) } -#ifdef CONFIG_SECURITY -/* code is in security.c */ +/* code is in security.c or kernel/sys.c if !SECURITY */ extern int capable(int cap); -#else -static inline int capable(int cap) -{ - if (cap_raised(current->cap_effective, cap)) { - current->flags |= PF_SUPERPRIV; - return 1; - } - return 0; -} -#endif /* * Routines for handling mm_structs -- cgit v1.2.3