summaryrefslogtreecommitdiff
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 0cbd0ed9579..0072c03dcde 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1140,7 +1140,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
unsigned long count, struct list_head *list,
int migratetype, int cold)
{
- int mt = migratetype, i;
+ int mt, i;
spin_lock(&zone->lock);
for (i = 0; i < count; ++i) {
@@ -1161,9 +1161,13 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
list_add(&page->lru, list);
else
list_add_tail(&page->lru, list);
+ mt = get_pageblock_migratetype(page);
if (IS_ENABLED(CONFIG_CMA)) {
- mt = get_pageblock_migratetype(page);
- if (!is_migrate_cma(mt) && !is_migrate_isolate(mt))
+ if (!is_migrate_cma(mt) && !is_migrate_isolate(mt) &&
+ !is_migrate_reserve(mt))
+ mt = migratetype;
+ } else {
+ if (!is_migrate_reserve(mt))
mt = migratetype;
}
set_freepage_migratetype(page, mt);