diff --git a/mm/internal.h b/mm/internal.h
index 129659f1e58ad9917cd8ce4d0396cbc88cb38d41..2d58ae15a9580cee1299635fe897c81f8768bf75 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -229,6 +229,7 @@ struct compact_control {
 	bool whole_zone;		/* Whole zone should/has been scanned */
 	bool contended;			/* Signal lock or sched contention */
 	bool rescan;			/* Rescanning the same pageblock */
+	bool alloc_contig;		/* alloc_contig_range allocation */
 };
 
 /*
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c494bf2751660c44ba2e4134524487fe84364739..f2cf66633e62a089c4d709ba3eaadc935501d90b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -8400,6 +8400,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
 		.ignore_skip_hint = true,
 		.no_set_skip_hint = true,
 		.gfp_mask = current_gfp_context(gfp_mask),
+		.alloc_contig = true,
 	};
 	INIT_LIST_HEAD(&cc.migratepages);