aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/page_isolation.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 9c03dca8c2a..6744235d2d0 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -200,8 +200,11 @@ __test_page_isolated_in_pageblock(unsigned long pfn, unsigned long end_pfn)
continue;
}
page = pfn_to_page(pfn);
- if (PageBuddy(page))
+ if (PageBuddy(page)) {
+ if (get_freepage_migratetype(page) != MIGRATE_ISOLATE)
+ break;
pfn += 1 << page_order(page);
+ }
else if (page_count(page) == 0 &&
get_freepage_migratetype(page) == MIGRATE_ISOLATE)
pfn += 1;