diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2009-09-21 20:03:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:38 -0400 |
commit | 1a8670a29b5277cbe601f74ab63d2c5211fb3005 (patch) | |
tree | 1b2ca94009c1f3d7ff05bbda3b8956631e3f38d9 | |
parent | 0b21767637c3c99890a248fe47ac414e51cf5eb7 (diff) |
oom: move oom_killer_enable()/oom_killer_disable to where they belong
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>
-rw-r--r-- | include/linux/gfp.h | 12 | ||||
-rw-r--r-- | include/linux/oom.h | 11 | ||||
-rw-r--r-- | kernel/power/process.c | 1 |
3 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index c32bfa8e7f1e..f53e9b868c26 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h | |||
@@ -335,18 +335,6 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); | |||
335 | void drain_all_pages(void); | 335 | void drain_all_pages(void); |
336 | void drain_local_pages(void *dummy); | 336 | void drain_local_pages(void *dummy); |
337 | 337 | ||
338 | extern bool oom_killer_disabled; | ||
339 | |||
340 | static inline void oom_killer_disable(void) | ||
341 | { | ||
342 | oom_killer_disabled = true; | ||
343 | } | ||
344 | |||
345 | static inline void oom_killer_enable(void) | ||
346 | { | ||
347 | oom_killer_disabled = false; | ||
348 | } | ||
349 | |||
350 | extern gfp_t gfp_allowed_mask; | 338 | extern gfp_t gfp_allowed_mask; |
351 | 339 | ||
352 | static inline void set_gfp_allowed_mask(gfp_t mask) | 340 | static inline void set_gfp_allowed_mask(gfp_t mask) |
diff --git a/include/linux/oom.h b/include/linux/oom.h index a7979baf1e39..6aac5fe4f6f1 100644 --- a/include/linux/oom.h +++ b/include/linux/oom.h | |||
@@ -30,5 +30,16 @@ extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); | |||
30 | extern int register_oom_notifier(struct notifier_block *nb); | 30 | extern int register_oom_notifier(struct notifier_block *nb); |
31 | extern int unregister_oom_notifier(struct notifier_block *nb); | 31 | extern int unregister_oom_notifier(struct notifier_block *nb); |
32 | 32 | ||
33 | extern bool oom_killer_disabled; | ||
34 | |||
35 | static inline void oom_killer_disable(void) | ||
36 | { | ||
37 | oom_killer_disabled = true; | ||
38 | } | ||
39 | |||
40 | static inline void oom_killer_enable(void) | ||
41 | { | ||
42 | oom_killer_disabled = false; | ||
43 | } | ||
33 | #endif /* __KERNEL__*/ | 44 | #endif /* __KERNEL__*/ |
34 | #endif /* _INCLUDE_LINUX_OOM_H */ | 45 | #endif /* _INCLUDE_LINUX_OOM_H */ |
diff --git a/kernel/power/process.c b/kernel/power/process.c index da2072d73811..cc2e55373b68 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #undef DEBUG | 9 | #undef DEBUG |
10 | 10 | ||
11 | #include <linux/interrupt.h> | 11 | #include <linux/interrupt.h> |
12 | #include <linux/oom.h> | ||
12 | #include <linux/suspend.h> | 13 | #include <linux/suspend.h> |
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/syscalls.h> | 15 | #include <linux/syscalls.h> |