diff options
-rw-r--r-- | mm/page_alloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8a8302711725..7b4d4e4ea64f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -4906,13 +4906,16 @@ int set_migratetype_isolate(struct page *page) | |||
4906 | struct zone *zone; | 4906 | struct zone *zone; |
4907 | unsigned long flags; | 4907 | unsigned long flags; |
4908 | int ret = -EBUSY; | 4908 | int ret = -EBUSY; |
4909 | int zone_idx; | ||
4909 | 4910 | ||
4910 | zone = page_zone(page); | 4911 | zone = page_zone(page); |
4912 | zone_idx = zone_idx(zone); | ||
4911 | spin_lock_irqsave(&zone->lock, flags); | 4913 | spin_lock_irqsave(&zone->lock, flags); |
4912 | /* | 4914 | /* |
4913 | * In future, more migrate types will be able to be isolation target. | 4915 | * In future, more migrate types will be able to be isolation target. |
4914 | */ | 4916 | */ |
4915 | if (get_pageblock_migratetype(page) != MIGRATE_MOVABLE) | 4917 | if (get_pageblock_migratetype(page) != MIGRATE_MOVABLE && |
4918 | zone_idx != ZONE_MOVABLE) | ||
4916 | goto out; | 4919 | goto out; |
4917 | set_pageblock_migratetype(page, MIGRATE_ISOLATE); | 4920 | set_pageblock_migratetype(page, MIGRATE_ISOLATE); |
4918 | move_freepages_block(zone, page, MIGRATE_ISOLATE); | 4921 | move_freepages_block(zone, page, MIGRATE_ISOLATE); |