From a18de9a235dc97999fcabdac699f33da9138b0ba Mon Sep 17 00:00:00 2001 From: Zi Yan Date: Fri, 22 Sep 2023 11:11:32 -0400 Subject: [PATCH 1/3] mm: fix __free_one_page(). Signed-off-by: Zi Yan --- mm/page_alloc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7de022bc4c7d..72f27d14c8e7 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -787,8 +787,6 @@ static inline void __free_one_page(struct page *page, VM_BUG_ON_PAGE(bad_range(zone, page), page); while (order < MAX_ORDER) { - int buddy_mt; - if (compaction_capture(capc, page, order, migratetype)) return; @@ -796,8 +794,6 @@ static inline void __free_one_page(struct page *page, if (!buddy) goto done_merging; - buddy_mt = get_pfnblock_migratetype(buddy, buddy_pfn); - if (unlikely(order >= pageblock_order)) { /* * We want to prevent merge between freepages on pageblock @@ -827,7 +823,7 @@ static inline void __free_one_page(struct page *page, if (page_is_guard(buddy)) clear_page_guard(zone, buddy, order); else - del_page_from_free_list(buddy, zone, order, buddy_mt); + del_page_from_free_list(buddy, zone, order, migratetype); combined_pfn = buddy_pfn & pfn; page = page + (combined_pfn - pfn); pfn = combined_pfn; -- 2.40.1