diff options
-rw-r--r-- | mm/compaction.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mm/compaction.c b/mm/compaction.c index b0fbfdfad298..da25b5a2e476 100644 --- a/mm/compaction.c +++ b/mm/compaction.c | |||
@@ -295,10 +295,25 @@ static unsigned long isolate_migratepages(struct zone *zone, | |||
295 | continue; | 295 | continue; |
296 | } | 296 | } |
297 | 297 | ||
298 | if (!PageLRU(page)) | ||
299 | continue; | ||
300 | |||
301 | /* | ||
302 | * PageLRU is set, and lru_lock excludes isolation, | ||
303 | * splitting and collapsing (collapsing has already | ||
304 | * happened if PageLRU is set). | ||
305 | */ | ||
306 | if (PageTransHuge(page)) { | ||
307 | low_pfn += (1 << compound_order(page)) - 1; | ||
308 | continue; | ||
309 | } | ||
310 | |||
298 | /* Try isolate the page */ | 311 | /* Try isolate the page */ |
299 | if (__isolate_lru_page(page, ISOLATE_BOTH, 0) != 0) | 312 | if (__isolate_lru_page(page, ISOLATE_BOTH, 0) != 0) |
300 | continue; | 313 | continue; |
301 | 314 | ||
315 | VM_BUG_ON(PageTransCompound(page)); | ||
316 | |||
302 | /* Successfully isolated */ | 317 | /* Successfully isolated */ |
303 | del_page_from_lru_list(zone, page, page_lru(page)); | 318 | del_page_from_lru_list(zone, page, page_lru(page)); |
304 | list_add(&page->lru, migratelist); | 319 | list_add(&page->lru, migratelist); |