diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2e860f431d6b12793ba9afd6207a62fcf90f2c3f..62d1ea3f2f5a40830ce869b37286bb73f1b8936d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3030,6 +3030,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 		apply_fair = false;
 		fair_skipped = false;
 		reset_alloc_batches(ac->preferred_zoneref->zone);
+		z = ac->preferred_zoneref;
 		goto zonelist_scan;
 	}