Re: [patch 5/7] uninline capable()

Matt Mackall
2006-01-07T00:34:52Z

On Fri, Jan 06, 2006 at 11:42:40AM +0100, Arjan van de Ven wrote:
> Subject: uninline capable()
> From: Ingo Molnar <mingo@elte.hu>
>
> 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 <mingo@elte.hu>

You forgot your sign-off.

> +#ifndef CONFIG_SECURITY
> +int capable(int cap)
> +{
> + if (cap_raised(current->cap_effective, cap)) {
> + current->flags |= PF_SUPERPRIV;
> + return 1;

Tabs, please.

> + }
> + return 0;
> +}
> +EXPORT_SYMBOL(capable);
> +#endif
> +

Also, I wonder if kernel/sys.c is really the best place for this. I'd
think security/std.c or the like would be preferable.

--
Mathematics is the supreme nostalgia of our time.