|
@@ -2249,6 +2249,7 @@ static bool __zone_watermark_ok(struct zone *z, unsigned int order,
|
|
|
min -= min / 2;
|
|
|
if (alloc_flags & ALLOC_HARDER)
|
|
|
min -= min / 4;
|
|
|
+
|
|
|
#ifdef CONFIG_CMA
|
|
|
/* If allocation can't use CMA areas don't use free CMA pages */
|
|
|
if (!(alloc_flags & ALLOC_CMA))
|
|
@@ -2278,14 +2279,14 @@ bool zone_watermark_ok(struct zone *z, unsigned int order, unsigned long mark,
|
|
|
}
|
|
|
|
|
|
bool zone_watermark_ok_safe(struct zone *z, unsigned int order,
|
|
|
- unsigned long mark, int classzone_idx, int alloc_flags)
|
|
|
+ unsigned long mark, int classzone_idx)
|
|
|
{
|
|
|
long free_pages = zone_page_state(z, NR_FREE_PAGES);
|
|
|
|
|
|
if (z->percpu_drift_mark && free_pages < z->percpu_drift_mark)
|
|
|
free_pages = zone_page_state_snapshot(z, NR_FREE_PAGES);
|
|
|
|
|
|
- return __zone_watermark_ok(z, order, mark, classzone_idx, alloc_flags,
|
|
|
+ return __zone_watermark_ok(z, order, mark, classzone_idx, 0,
|
|
|
free_pages);
|
|
|
}
|
|
|
|