diff options
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 446bb36ee59d..d73c346d91b3 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2249,6 +2249,7 @@ static bool __zone_watermark_ok(struct zone *z, unsigned int order, | |||
2249 | min -= min / 2; | 2249 | min -= min / 2; |
2250 | if (alloc_flags & ALLOC_HARDER) | 2250 | if (alloc_flags & ALLOC_HARDER) |
2251 | min -= min / 4; | 2251 | min -= min / 4; |
2252 | |||
2252 | #ifdef CONFIG_CMA | 2253 | #ifdef CONFIG_CMA |
2253 | /* If allocation can't use CMA areas don't use free CMA pages */ | 2254 | /* If allocation can't use CMA areas don't use free CMA pages */ |
2254 | if (!(alloc_flags & ALLOC_CMA)) | 2255 | if (!(alloc_flags & ALLOC_CMA)) |
@@ -2278,14 +2279,14 @@ bool zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark, | |||
2278 | } | 2279 | } |
2279 | 2280 | ||
2280 | bool zone_watermark_ok_safe(struct zone *z, unsigned int order, | 2281 | bool zone_watermark_ok_safe(struct zone *z, unsigned int order, |
2281 | unsigned long mark, int classzone_idx, int alloc_flags) | 2282 | unsigned long mark, int classzone_idx) |
2282 | { | 2283 | { |
2283 | long free_pages = zone_page_state(z, NR_FREE_PAGES); | 2284 | long free_pages = zone_page_state(z, NR_FREE_PAGES); |
2284 | 2285 | ||
2285 | if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark) | 2286 | if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark) |
2286 | free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES); | 2287 | free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES); |
2287 | 2288 | ||
2288 | return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags, | 2289 | return __zone_watermark_ok(z, order, mark, classzone_idx, 0, |
2289 | free_pages); | 2290 | free_pages); |
2290 | } | 2291 | } |
2291 | 2292 | ||