Skip to contentSkip to conversation

md-remove-the-last-use-of-page_buffers.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 9

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: md: remove the last use of page_buffers()
has been removed from the -mm tree. Its filename was
md-remove-the-last-use-of-page_buffers.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: "Matthew Wilcox (Oracle)" <[email protected]>
Subject: md: remove the last use of page_buffers()
Date: Sun, 20 Sep 2026 22:28:11 -0400

Convert the page to a folio and use folio_buffers() instead. This does introduce one extra call to compound_head(), but will simplify a later conversion of md-bitmap to use folios instead of pages.

---

 drivers/md/md-bitmap.c      |    3 ++-
 include/linux/buffer_head.h |    7 +------
 2 files changed, 3 insertions(+), 7 deletions(-)
drivers/md/md-bitmap.c renamed from drivers/md/md-bitmap.c~md-remove-the-last-use-of-page_buffers +2 -1
@@ -516,7 +516,8 @@ static void end_bitmap_write(struct bio
 
 static void write_file_page(struct bitmap *bitmap, struct page *page, int wait)
 {
-	struct buffer_head *bh = page_buffers(page);
+	struct folio *folio = page_folio(page);
+	struct buffer_head *bh = folio_buffers(folio);
 
 	while (bh && bh->b_blocknr) {
 		atomic_inc(&bitmap->pending_writes);
include/linux/buffer_head.h renamed from include/linux/buffer_head.h~md-remove-the-last-use-of-page_buffers +1 -6
@@ -175,12 +175,7 @@ static inline unsigned long bh_offset(co
 	return (unsigned long)(bh)->b_data & (page_size(bh->b_page) - 1);
 }
 
-/* If we *know* page->private refers to buffer_heads */
-#define page_buffers(page)					\
-	({							\
-		BUG_ON(!PagePrivate(page));			\
-		((struct buffer_head *)page_private(page));	\
-	})
+/* If we *know* folio->private refers to buffer_heads */
 #define folio_buffers(folio)		folio_get_private(folio)
 
 void buffer_check_dirty_writeback(struct folio *folio,

_

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