提交 1a8670a2 编写于 作者: A Alexey Dobriyan 提交者: Linus Torvalds

oom: move oom_killer_enable()/oom_killer_disable to where they belong

Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
Acked-by: NDavid Rientjes <rientjes@google.com>
Reviewed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0b217676
...@@ -335,18 +335,6 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp); ...@@ -335,18 +335,6 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
void drain_all_pages(void); void drain_all_pages(void);
void drain_local_pages(void *dummy); 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; extern gfp_t gfp_allowed_mask;
static inline void set_gfp_allowed_mask(gfp_t mask) static inline void set_gfp_allowed_mask(gfp_t mask)
......
...@@ -30,5 +30,16 @@ extern void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order); ...@@ -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 register_oom_notifier(struct notifier_block *nb);
extern int unregister_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 /* __KERNEL__*/
#endif /* _INCLUDE_LINUX_OOM_H */ #endif /* _INCLUDE_LINUX_OOM_H */
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#undef DEBUG #undef DEBUG
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/oom.h>
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册