Skip to contentSkip to conversation

mm-use-zone-lock-guard-in-__offline_isolated_pages.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 29

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: use zone lock guard in __offline_isolated_pages()
has been removed from the -mm tree. Its filename was
mm-use-zone-lock-guard-in-__offline_isolated_pages.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Dmitry Ilvokhin <[email protected]>
Subject: mm: use zone lock guard in __offline_isolated_pages()
Date: Wed, 29 Apr 2026 12:02:13 +0000

Use spinlock_irqsave zone lock guard in __offline_isolated_pages() to replace the explicit lock/unlock pattern with automatic scope-based cleanup.

---

 mm/page_alloc.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-use-zone-lock-guard-in-__offline_isolated_pages +2 -3
@@ -7531,7 +7531,7 @@ void zone_pcp_reset(struct zone *zone)
 unsigned long __offline_isolated_pages(unsigned long start_pfn,
 		unsigned long end_pfn)
 {
-	unsigned long already_offline = 0, flags;
+	unsigned long already_offline = 0;
 	unsigned long pfn = start_pfn;
 	struct page *page;
 	struct zone *zone;
@@ -7539,7 +7539,7 @@ unsigned long __offline_isolated_pages(u
 
 	offline_mem_sections(pfn, end_pfn);
 	zone = page_zone(pfn_to_page(pfn));
-	spin_lock_irqsave(&zone->lock, flags);
+	guard(spinlock_irqsave)(&zone->lock);
 	while (pfn < end_pfn) {
 		page = pfn_to_page(pfn);
 		/*
@@ -7569,7 +7569,6 @@ unsigned long __offline_isolated_pages(u
 		del_page_from_free_list(page, zone, order, MIGRATE_ISOLATE);
 		pfn += (1 << order);
 	}
-	spin_unlock_irqrestore(&zone->lock, flags);
 
 	return end_pfn - start_pfn - already_offline;
 }

_

Patches currently in -mm which might be from [email protected] are

mm-page_alloc-fix-defrag_mode-for-non-reclaimable-allocations.patch