aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/page_alloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index da526905b4a5..30f327a720fd 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1917,6 +1917,8 @@ get_page_from_freelist(gfp_t gfp_mask, nodemask_t *nodemask, unsigned int order,
1917 nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */ 1917 nodemask_t *allowednodes = NULL;/* zonelist_cache approximation */
1918 int zlc_active = 0; /* set if using zonelist_cache */ 1918 int zlc_active = 0; /* set if using zonelist_cache */
1919 int did_zlc_setup = 0; /* just call zlc_setup() one time */ 1919 int did_zlc_setup = 0; /* just call zlc_setup() one time */
1920 bool consider_zone_dirty = (alloc_flags & ALLOC_WMARK_LOW) &&
1921 (gfp_mask & __GFP_WRITE);
1920 1922
1921 classzone_idx = zone_idx(preferred_zone); 1923 classzone_idx = zone_idx(preferred_zone);
1922zonelist_scan: 1924zonelist_scan:
@@ -1976,8 +1978,7 @@ zonelist_scan:
1976 * will require awareness of zones in the 1978 * will require awareness of zones in the
1977 * dirty-throttling and the flusher threads. 1979 * dirty-throttling and the flusher threads.
1978 */ 1980 */
1979 if ((alloc_flags & ALLOC_WMARK_LOW) && 1981 if (consider_zone_dirty && !zone_dirty_ok(zone))
1980 (gfp_mask & __GFP_WRITE) && !zone_dirty_ok(zone))
1981 continue; 1982 continue;
1982 1983
1983 mark = zone->watermark[alloc_flags & ALLOC_WMARK_MASK]; 1984 mark = zone->watermark[alloc_flags & ALLOC_WMARK_MASK];