Skip to contentSkip to conversation

mm-use-zone-lock-guard-in-free_pcppages_bulk.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 free_pcppages_bulk()
has been removed from the -mm tree. Its filename was
mm-use-zone-lock-guard-in-free_pcppages_bulk.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 free_pcppages_bulk()
Date: Wed, 29 Apr 2026 12:02:12 +0000

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

---

 mm/page_alloc.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
mm/page_alloc.c renamed from mm/page_alloc.c~mm-use-zone-lock-guard-in-free_pcppages_bulk +1 -4
@@ -1469,7 +1469,6 @@ static void free_pcppages_bulk(struct zo
 					struct per_cpu_pages *pcp,
 					int pindex)
 {
-	unsigned long flags;
 	unsigned int order;
 	struct page *page;
 
@@ -1482,7 +1481,7 @@ static void free_pcppages_bulk(struct zo
 	/* Ensure requested pindex is drained first. */
 	pindex = pindex - 1;
 
-	spin_lock_irqsave(&zone->lock, flags);
+	guard(spinlock_irqsave)(&zone->lock);
 
 	while (count > 0) {
 		struct list_head *list;
@@ -1514,8 +1513,6 @@ static void free_pcppages_bulk(struct zo
 			trace_mm_page_pcpu_drain(page, order, mt);
 		} while (count > 0 && !list_empty(list));
 	}
-
-	spin_unlock_irqrestore(&zone->lock, flags);
 }
 
 /* Split a multi-block free page into its individual pageblocks. */

_

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

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