hugetlb: restore interleaving of bootmem huge pages (2.6.31)
[pandora-kernel.git] / mm / oom_kill.c
index 8a5467e..64e5b4b 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/module.h>
 #include <linux/notifier.h>
 #include <linux/memcontrol.h>
+#include <linux/security.h>
 
 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;
 
        /*