diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index a6a062e409eb..90dc501eaf3f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -2612,7 +2612,7 @@ retry: | |||
2612 | 2612 | ||
2613 | nr_reclaimed = mem_cgroup_reclaim(mem_over_limit, gfp_mask, flags); | 2613 | nr_reclaimed = mem_cgroup_reclaim(mem_over_limit, gfp_mask, flags); |
2614 | 2614 | ||
2615 | if (mem_cgroup_margin(mem_over_limit) >= batch) | 2615 | if (mem_cgroup_margin(mem_over_limit) >= nr_pages) |
2616 | goto retry; | 2616 | goto retry; |
2617 | 2617 | ||
2618 | if (gfp_mask & __GFP_NORETRY) | 2618 | if (gfp_mask & __GFP_NORETRY) |
@@ -2626,7 +2626,7 @@ retry: | |||
2626 | * unlikely to succeed so close to the limit, and we fall back | 2626 | * unlikely to succeed so close to the limit, and we fall back |
2627 | * to regular pages anyway in case of failure. | 2627 | * to regular pages anyway in case of failure. |
2628 | */ | 2628 | */ |
2629 | if (nr_reclaimed && batch <= (1 << PAGE_ALLOC_COSTLY_ORDER)) | 2629 | if (nr_reclaimed && nr_pages <= (1 << PAGE_ALLOC_COSTLY_ORDER)) |
2630 | goto retry; | 2630 | goto retry; |
2631 | /* | 2631 | /* |
2632 | * At task move, charge accounts can be doubly counted. So, it's | 2632 | * At task move, charge accounts can be doubly counted. So, it's |
@@ -2644,7 +2644,7 @@ retry: | |||
2644 | if (fatal_signal_pending(current)) | 2644 | if (fatal_signal_pending(current)) |
2645 | goto bypass; | 2645 | goto bypass; |
2646 | 2646 | ||
2647 | mem_cgroup_oom(mem_over_limit, gfp_mask, get_order(batch)); | 2647 | mem_cgroup_oom(mem_over_limit, gfp_mask, get_order(nr_pages)); |
2648 | nomem: | 2648 | nomem: |
2649 | if (!(gfp_mask & __GFP_NOFAIL)) | 2649 | if (!(gfp_mask & __GFP_NOFAIL)) |
2650 | return -ENOMEM; | 2650 | return -ENOMEM; |