Skip to content

Commit

Permalink
oom: move oom_killer_enable()/oom_killer_disable to where they belong
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Sep 22, 2009
1 parent 0b21767 commit 1a8670a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 0 additions & 12 deletions include/linux/gfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions include/linux/oom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
1 change: 1 addition & 0 deletions kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 1a8670a

Please sign in to comment.