diff --git a/[refs] b/[refs] index bbee08f7a2f7..4b04eb378bae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9fad4cc3975573a359a92ad047f5995d8391631 +refs/heads/master: e16885c5ad624a6efe1b1bf764e075d75f65a788 diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index c4ee35dd18ae..2ae8711bfba1 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/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 diff --git a/trunk/kernel/sys.c b/trunk/kernel/sys.c index b6941e06d5d5..9ccf713491f9 100644 --- a/trunk/kernel/sys.c +++ b/trunk/kernel/sys.c @@ -223,6 +223,18 @@ int unregister_reboot_notifier(struct notifier_block * nb) EXPORT_SYMBOL(unregister_reboot_notifier); +#ifndef CONFIG_SECURITY +int capable(int cap) +{ + if (cap_raised(current->cap_effective, cap)) { + current->flags |= PF_SUPERPRIV; + return 1; + } + return 0; +} +EXPORT_SYMBOL(capable); +#endif + static int set_one_prio(struct task_struct *p, int niceval, int error) { int no_nice;