oom: move oom_killer_enable()/oom_killer_disable to where they belong
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 22 Sep 2009 00:03:09 +0000 (17:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 22 Sep 2009 14:17:38 +0000 (07:17 -0700)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/gfp.h
include/linux/oom.h
kernel/power/process.c

index c32bfa8e7f1e16ec637db6955d7a5be1aea4bf3a..f53e9b868c26c053f86c5bcff3cbc582c12bc7b2 100644 (file)
@@ -335,18 +335,6 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
 void drain_all_pages(void);
 void drain_local_pages(void *dummy);
 
-extern bool oom_killer_disabled;
-
-static inline void oom_killer_disable(void)
-{
-       oom_killer_disabled = true;
-}
-
-static inline void oom_killer_enable(void)
-{
-       oom_killer_disabled = false;
-}
-
 extern gfp_t gfp_allowed_mask;
 
 static inline void set_gfp_allowed_mask(gfp_t mask)
index a7979baf1e39b102948698ebf46551db5f2034ca..6aac5fe4f6f120db2b2c9b5199d69e7d820d5856 100644 (file)
@@ -30,5 +30,16 @@ extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order);
 extern int register_oom_notifier(struct notifier_block *nb);
 extern int unregister_oom_notifier(struct notifier_block *nb);
 
+extern bool oom_killer_disabled;
+
+static inline void oom_killer_disable(void)
+{
+       oom_killer_disabled = true;
+}
+
+static inline void oom_killer_enable(void)
+{
+       oom_killer_disabled = false;
+}
 #endif /* __KERNEL__*/
 #endif /* _INCLUDE_LINUX_OOM_H */
index da2072d7381160493d540a51976f45a966b265fb..cc2e55373b68cc3f32e83fbf036200c30a14f343 100644 (file)
@@ -9,6 +9,7 @@
 #undef DEBUG
 
 #include <linux/interrupt.h>
+#include <linux/oom.h>
 #include <linux/suspend.h>
 #include <linux/module.h>
 #include <linux/syscalls.h>