Skip to contentSkip to conversation

mm: fix a wrong flag in set_migratetype_isolate()

PATCH RESEND Applied Qian Cai 1 participant 1 message Mar 20, 2019

Subsystems (3)
lore
Share & tools
lore

Qian Cai

author
#0 lore raw

PATCH RESEND 1/1 mm: fix a wrong flag in set_migratetype_isolate()

Due to has_unmovable_pages() takes an incorrect irqsave flag instead of the isolation flag in set_migratetype_isolate(), it causes issues with HWPOSION and error reporting where dump_page() is not called when there is an unmoveable page.

Fixes d381c54760dc ("mm: only report isolation failures when offlining memory")
---
 mm/page_isolation.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mm/page_isolation.c +2 -1
index bf4159d771c7..019280712e1b 100644
@@ -59,7 +59,8 @@ static int set_migratetype_isolate(struct page *page, int migratetype, int isol_
 	 * FIXME: Now, memory hotplug doesn't call shrink_slab() by itself.
 	 * We just check MOVABLE pages.
 	 */
-	if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype, flags))
+	if (!has_unmovable_pages(zone, page, arg.pages_found, migratetype,
+				 isol_flags))
 		ret = 0;
 
 	/*
Signature · 1 line
2.17.2 (Apple Git-113)