X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mm%2Foom_kill.c;h=64e5b4bcd964cd912b5a5f6b22dc392621269d84;hb=0c7281c0faa1d0bdbdc647430cbdf7e0aed7f385;hp=8a5467ee6265deb11a48fe9861348dd182dc9f7f;hpb=595f403c1af37b1339e64b89040528b8cd48c5a3;p=linux-2.6 diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 8a5467ee62..64e5b4bcd9 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -26,6 +26,7 @@ #include #include #include +#include int sysctl_panic_on_oom; int sysctl_oom_kill_allocating_task; @@ -128,7 +129,8 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) * Superuser processes are usually more important, so we make it * less likely that we kill those. */ - if (__capable(p, CAP_SYS_ADMIN) || __capable(p, CAP_SYS_RESOURCE)) + if (has_capability(p, CAP_SYS_ADMIN) || + has_capability(p, CAP_SYS_RESOURCE)) points /= 4; /* @@ -137,7 +139,7 @@ unsigned long badness(struct task_struct *p, unsigned long uptime) * tend to only have this flag set on applications they think * of as important. */ - if (__capable(p, CAP_SYS_RAWIO)) + if (has_capability(p, CAP_SYS_RAWIO)) points /= 4; /*