From 13aa15180a595bb7c2b61b397d8a32623b70df31 Mon Sep 17 00:00:00 2001 From: Kalesh Singh Date: Tue, 27 May 2025 21:13:11 -0700 Subject: [PATCH] Revert "UPSTREAM: mm: page_alloc: fix move_freepages_block() range error" This reverts commit 24d6337da4f570e7365c75124c423dfdff7dde54. Change-Id: Ic80736e46eb554caf3ac0fa566258d395123d17f Bug: 420771453 Signed-off-by: Kalesh Singh --- mm/page_alloc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index b42461129b8a..2ade3957d0f1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1845,15 +1845,9 @@ int move_freepages_block(struct zone *zone, struct page *page, start_pfn = pageblock_start_pfn(pfn); end_pfn = pageblock_end_pfn(pfn) - 1; - /* - * The caller only has the lock for @zone, don't touch ranges - * that straddle into other zones. While we could move part of - * the range that's inside the zone, this call is usually - * accompanied by other operations such as migratetype updates - * which also should be locked. - */ + /* Do not cross zone boundaries */ if (!zone_spans_pfn(zone, start_pfn)) - return 0; + start_pfn = pfn; if (!zone_spans_pfn(zone, end_pfn)) return 0;