mm, PM/Freezer: Disable OOM killer when tasks are frozen
[linux-2.6.git] / include / linux / gfp.h
index 4efa330..06b7e8c 100644 (file)
@@ -243,4 +243,16 @@ 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;
+}
+
 #endif /* __LINUX_GFP_H */