aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorQiang Huang <h.huangqiang@huawei.com>2013-11-12 18:07:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:04 -0500
commitb9921ecdee66984b00c38c00a358ef3f611d2b50 (patch)
treecaf420f152f6c8764f150ad336645deec9acaeb2 /mm/page_alloc.c
parent9c2606b77d6bffb422928bca66c8dc84d85089be (diff)
mm: add a helper function to check may oom condition
Use helper function to check if we need to deal with oom condition. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 3d1d75a6629f..e0412c026e0d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2593,7 +2593,7 @@ rebalance:
2593 * running out of options and have to consider going OOM 2593 * running out of options and have to consider going OOM
2594 */ 2594 */
2595 if (!did_some_progress) { 2595 if (!did_some_progress) {
2596 if ((gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY)) { 2596 if (oom_gfp_allowed(gfp_mask)) {
2597 if (oom_killer_disabled) 2597 if (oom_killer_disabled)
2598 goto nopage; 2598 goto nopage;
2599 /* Coredumps can quickly deplete all memory reserves */ 2599 /* Coredumps can quickly deplete all memory reserves */