aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mmzone.h3
-rw-r--r--mm/page_alloc.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index a47c879e1304..0aa4445b0b8a 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -50,9 +50,6 @@ extern int page_group_by_mobility_disabled;
50 50
51static inline int get_pageblock_migratetype(struct page *page) 51static inline int get_pageblock_migratetype(struct page *page)
52{ 52{
53 if (unlikely(page_group_by_mobility_disabled))
54 return MIGRATE_UNMOVABLE;
55
56 return get_pageblock_flags_group(page, PB_migrate, PB_migrate_end); 53 return get_pageblock_flags_group(page, PB_migrate, PB_migrate_end);
57} 54}
58 55
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 512bf9a618c7..b09859629e93 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -168,6 +168,10 @@ int page_group_by_mobility_disabled __read_mostly;
168 168
169static void set_pageblock_migratetype(struct page *page, int migratetype) 169static void set_pageblock_migratetype(struct page *page, int migratetype)
170{ 170{
171
172 if (unlikely(page_group_by_mobility_disabled))
173 migratetype = MIGRATE_UNMOVABLE;
174
171 set_pageblock_flags_group(page, (unsigned long)migratetype, 175 set_pageblock_flags_group(page, (unsigned long)migratetype,
172 PB_migrate, PB_migrate_end); 176 PB_migrate, PB_migrate_end);
173} 177}