* [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead
@ 2026-09-14 2:23 Zi Yan
2026-09-14 2:24 ` [PATCH v4 13/16] md/md-bitmap: replace PagePrivate() with page_private() Zi Yan
` (7 more replies)
0 siblings, 8 replies; 22+ messages in thread
From: Zi Yan @ 2026-09-14 2:23 UTC (permalink / raw)
To: David Hildenbrand, Matthew Wilcox (Oracle), Andrew Morton,
Muchun Song, Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka,
Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Baolin Wang,
Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang,
Usama Arif, Gregory Price, Ying Huang, Alistair Popple,
Johannes Weiner, Qi Zheng, Shakeel Butt, Kairui Song
Cc: linux-mm, linux-kernel, Zi Yan, Minchan Kim, Sergey Senozhatsky,
Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Namhyung Kim, Thomas Gleixner, Borislav Petkov, Dave Hansen, x86,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Ian Rogers,
Adrian Hunter, James Clark, H. Peter Anvin, linux-perf-users,
Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko,
xen-devel, Eric Biggers, Theodore Y. Ts'o, Jaegeuk Kim,
linux-fscrypt, Oscar Salvador, Chao Yu, linux-f2fs-devel,
Tal Zussman, Gao Xiang, Jan Kara, Yue Hu, Jeffle Xu,
Sandeep Dhavale, Hongbo Li, Chunhai Guo, linux-erofs,
linux-fsdevel, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Matthew Brost, Joshua Hahn, Rakie Kim,
Byungchul Park, Axel Rasmussen, Yuanchu Xie, Wei Xu,
linux-trace-kernel, Trond Myklebust, Anna Schumaker, linux-nfs,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko, ceph-devel,
Song Liu, Yu Kuai, Li Nan, Xiao Ni, linux-raid,
Richard Weinberger, Zhihao Cheng, linux-mtd, Baoquan He,
Pasha Tatashin, Pratyush Yadav, Jonathan Corbet, Dave Young,
Shuah Khan, kexec, linux-doc
Hi all,
This patchset removes PG_private to make space for upcoming PG_folio for
identifying pages from a folio (more details in Note below). Instead of
checking PG_private, all code is changed to check page/folio->private !=
NULL instead.
MM people are cc'd on all patches and subsystem people are cc'd on the
cover letter and corresponding patches.
Patch 6 is picked up separately in f2fs tree, but since mm-new does not
have it yet, it is sent for MM testing.
Overview
===
Most code uses folio_attach/detach/change_private() functions, so folio
refcount is increased and decreased when folio->private is set and reset,
respectively. There is no need to change them.
Changes are needed for exceptional users:
1. zsmalloc uses PG_private to indicate first component zpdesc page and
page->private is used to store zspage in zpdesc. To remove PG_private,
is_first_zpdesc() is replaced by pointer comparison.
2. kernel/events/ring_buffer.c stores page order in page->private.
Replacing PG_private with page->private != NULL works.
3. drivers/xen/grant-table.c stores xen_page_foreign in page->private,
where on 32-bit, a pointer to xen_page_foreign is stored; on 64-bit,
page->private is used as xen_page_foreign. PG_private check is replaced
by page->private != NULL on 32-bit for xen_page_foreign deallocation.
On 64-bit, page->private is cleared unconditionally since {domid=0,
gref=0} (xen_page_foreign can be 0) is valid.
4. fs/crypto/crypto.c stores a folio pointer in page->private, PG_private
checks are replaced by page->private != NULL.
5. fs/erofs has two different uses:
5a. folio->private is used to form a reversed list of
the outputs of readahead_folio(). readahead_folio_last() is added to
output folios in reversed order, so that ->private is no longer needed.
5b. folio->private is used as an in-flight I/O counter. Convert the
code to use folio_attach/detach/get_private() and add bias==1 to the
counter to avoid folio->private being zero.
6. fs/nfs/write.c: folio refcount maintenance is in a bigger scope than
folio->private. So folio_attach/detach/get_private() is not used.
Nothing to change.
7. fs/f2fs uses attach_page_private() to first reset folio->private then
immediately sets PAGE_PRIVATE_NOT_POINTER bit on it. Change it to use
attach_page_private() to set PAGE_PRIVATE_NOT_POINTER bit directly to
avoid folio->private == NULL gap inside set_page_private_##name().
8. hugetlb uses folio_change_private(folio, NULL) without folio refcount
maintenance. Change it to folio->private = NULL.
After the above changes, PG_private ops are converted to
page/folio->private ops.
folio_has_attached_private() is added to check filesystem-only private data
by excluding swapcache and hugetlb folios, because swapcache folios overlap
swp_entry_t swap with ->private and hugetlb sets its own flags in
->private.
Note
===
1. KPF_PRIVATE is removed after PG_private is removed.
2. Documentation/mm/hugetlbfs_reserv.rst is outdated, so I did not remove
PG_private related text. It should be rewritten.
3. PG_folio is planned to be set on every page from a folio in
page_rmappable_folio(), so folios with any order (currently
PG_large_rmappable is used to identify >0 order folios, but not order-0
folios) can be identified. Then vm_insert_*() can correctly reject all
folios and rmap code will only see folios. Eventually, page_folio()
will return NULL for non-folio pages by checking PG_folio, but before
that all existing users that treat compound pages as folios will need
to be converted.
Tests
===
1. allmodconfig build passed.
2. zsmalloc is tested using ext4 on a 1GB lz4 zram:
2a. zram load + zsmalloc compaction;
2b. concurrent zspage migration via memory compaction;
2c. confirmed that multi-page zspages actually formed.
Details: https://github.com/x-y-z/linux-dev/blob/b4/remove-pg_private/test_zsmalloc.md
3. erofs is tested on images created with -C4096 and lz4hc, lzma,
deflate, and zstd algorithms:
3a. cold read of all files, verify checksums match source;
3b. readahead + reclaim/migration race.
Details: https://github.com/x-y-z/linux-dev/blob/b4/remove-pg_private/test_erofs.md
4. fscrypt is tested on software-encrypted ext4 with writes to exercise
bounce pages.
Details: https://github.com/x-y-z/linux-dev/blob/b4/remove-pg_private/test_fscrypt.md
5. f2fs is tested on an image with inline_data,compress_algorithm=lz4:
5a. INLINE_INODE — lots of tiny files;
5b. REF_RESOURCE + general writeback — buffered write churn with fsync;
5c. ONGOING_MIGRATION — force GC / page migration;
5d. ATOMIC_WRITE — atomic-write ioctl path.
Details: https://github.com/x-y-z/linux-dev/blob/b4/remove-pg_private/test_f2fs.md
(I did not run xfstests)
6. MM selftests passed.
LLM use
===
Claude was used to form a concrete plan on what code needs to be changed
and how to change them. The plan was reviewed by Codex until no issue was
spotted.
Plan is at: https://github.com/x-y-z/linux-dev/blob/b4/remove-pg_private/plan.md
I then followed the plan to make code changes. I did bounce ideas with
Claude how to change fs/erofs, since I did not like the original idea.
After each change, I asked Claude to review my code and git commit message.
I also asked Claude to give me test plans (see above).
At last, Codex was used to review all patches.
Comments and suggestions are welcome. Thanks.
Assisted-by: LLM
Signed-off-by: Zi Yan <ziy@nvidia.com>
---
Changes in v4:
1. dropped set_page_private(0) in balloon_retrieve(), since page->private
is cleared at that point.
2. simplified the comment in add_hugetlb_folio().
3. additional cleanup for f2fs to remove fio->page uses and convert
PAGE_PRIVATE_* flags and helper to folio-only.
4. added a comment for __readahead_advance().
5. added core-mm split/migration interaction information on newly added
folio_attach/detach_private() for erofs.
6. renamed folio_test_fs_private() to folio_has_attached_private() and
merged the commit introducing folio_test_fs_private() into its prior
commit.
7. adjusted the patch subject: "treewide: remove folio_set/clear_private()
*usage*"
8. split "treewide: replace PagePrivate() with page_private()" into three.
9. moved some comments in "treewide: remove PagePrivate() and PG_private
from comments and docs" to prior patches along with code changes.
10. used PG_folio instead of __PG_folio to avoid additional
code change in __def_pageflag_names().
- Link to v3: https://patch.msgid.link/20260907-remove-pg_private-v3-0-6ae22f9d9272@nvidia.com
Changes in v3:
1. changed folio_test_fs_private() to check PG_swapbacked instead of
PG_swapcache for excluding swapcache folios. Because folio->private and
PG_swapcache are not set as a whole, making folio_test_fs_private() give
false positive, whereas PG_swapbacked is always set for swapcache
folios.
2. added __DEF_PAGEFLAG_NAME() to show __PG_folio instead of open code.
3. f2fs change is picked up at
https://git.kernel.org/jaegeuk/f2fs/c/5ad9409a9533, mm-new currently
does not have it, so the patch is sent for MM testing purpose.
- Link to v2: https://patch.msgid.link/20260831-remove-pg_private-v2-0-3668159cd9e8@nvidia.com
Changes in v2:
1. removed is_first_zpdesc() in patch 1 and open coded the checks.
2. fixed wording in patch 2's commit message and clarified page_private()
also works when ring buffer's AUX page order is 0.
3. removed the empty loop in 64-bit gnttab_pages_set_private().
4. clarified folio->private will be reset to NULL by
fscrypt_free_bounce_page() in the commit message.
5. clarified why hugetlb needs to restore hugetlb_vmemmap_optimized.
6. renamed readahead_folio_reverse() readahead_folio_last() and
reimplemented readahead_folio_last() by adding a new readahead_control
private member, _forward, and a new helper __readahead_advance().
7. added a bias, 1, to erofs I/O counter, so that folio->private stays non
NULL between folio_attach_private() and folio_detach_private().
8. converted more call sites to use folio_test_fs_private().
- Link to v1: https://lore.kernel.org/r/20260731-remove-pg_private-v1-0-142c97ba3562@nvidia.com
---
Zi Yan (16):
mm/zsmalloc: replace PG_private with pointer comparison
perf/ring_buffer: stop using PG_private as AUX page high-order marker
xen/grant-table: stop setting PG_private on pages for grant mapping
fscrypt: stop setting PG_private on bounce page
mm/hugetlb: use direct assignment instead of folio_change_private()
f2fs: stop using PG_private
f2fs: convert the ->private flag helpers to folio-only
erofs: mm/pagemap: add readahead_folio_last() to avoid folio->private
erofs: use folio_attach/detach_private() instead of direct assignment
mm/page-flags: check page/folio->private instead of PG_private
treewide: remove folio_set/clear_private() usage
ceph: replace PagePrivate() with page_private()
md/md-bitmap: replace PagePrivate() with page_private()
buffer: replace page_buffer() with page_private() and delete it
treewide: remove PagePrivate() and PG_private from comments and docs
mm/page-flags: remove PG_private
Documentation/admin-guide/kdump/vmcoreinfo.rst | 2 +-
Documentation/filesystems/vfs.rst | 6 +-
arch/x86/events/intel/bts.c | 3 -
arch/x86/events/intel/pt.c | 6 +-
drivers/md/md-bitmap.c | 7 +-
drivers/xen/grant-table.c | 11 ++-
fs/ceph/addr.c | 8 +--
fs/crypto/crypto.c | 2 -
fs/erofs/data.c | 16 +++--
fs/erofs/zdata.c | 13 +---
fs/f2fs/compress.c | 35 +++++----
fs/f2fs/data.c | 2 +-
fs/f2fs/f2fs.h | 99 ++++++++++----------------
fs/f2fs/segment.c | 2 +-
fs/nfs/file.c | 4 +-
fs/nfs/write.c | 2 -
fs/proc/page.c | 1 -
fs/ubifs/file.c | 8 +--
include/linux/buffer_head.h | 6 --
include/linux/kernel-page-flags.h | 1 -
include/linux/mm.h | 35 +++++----
include/linux/mm_types.h | 4 +-
include/linux/page-flags.h | 43 ++++++++---
include/linux/pagemap.h | 64 ++++++++++++++---
include/trace/events/mmflags.h | 2 +-
include/trace/events/pagemap.h | 3 +-
kernel/events/ring_buffer.c | 7 +-
kernel/vmcore_info.c | 1 -
mm/huge_memory.c | 3 +-
mm/hugetlb.c | 7 +-
mm/migrate.c | 3 +-
mm/page-writeback.c | 3 +-
mm/vmscan.c | 2 +-
mm/zpdesc.h | 2 +-
mm/zsmalloc.c | 24 ++-----
tools/mm/page-types.c | 2 -
36 files changed, 228 insertions(+), 211 deletions(-)
---
base-commit: 3833e2f6aa6bf6af169f78a27843dfa2804be5a6
change-id: 20260728-remove-pg_private-cfe926c7f83c
Best regards,
--
Yan, Zi
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH v4 13/16] md/md-bitmap: replace PagePrivate() with page_private()
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
@ 2026-09-14 2:24 ` Zi Yan
2026-09-14 2:24 ` [PATCH v4 14/16] buffer: replace page_buffer() with page_private() and delete it Zi Yan
` (6 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: Zi Yan @ 2026-09-14 2:24 UTC (permalink / raw)
To: David Hildenbrand, Matthew Wilcox (Oracle), Andrew Morton,
Muchun Song, Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka,
Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Baolin Wang,
Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang,
Usama Arif, Gregory Price, Ying Huang, Alistair Popple,
Johannes Weiner, Qi Zheng, Shakeel Butt, Kairui Song
Cc: linux-mm, linux-kernel, Zi Yan, Song Liu, Yu Kuai, Li Nan,
Xiao Ni, linux-raid
PagePrivate() is going to be removed along with PG_private and its
implementation has been changed to match page_private().
Assisted-by: LLM
Signed-off-by: Zi Yan <ziy@nvidia.com>
To: Song Liu <song@kernel.org>
To: Yu Kuai <yukuai@fygo.io>
Cc: Li Nan <magiclinan@didiglobal.com>
Cc: Xiao Ni <xiao@kernel.org>
Cc: linux-raid@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/md/md-bitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index b8325cb09a371..84122834b6108 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -535,7 +535,7 @@ static void free_buffers(struct page *page)
{
struct buffer_head *bh;
- if (!PagePrivate(page))
+ if (!page_private(page))
return;
bh = page_buffers(page);
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v4 14/16] buffer: replace page_buffer() with page_private() and delete it
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
2026-09-14 2:24 ` [PATCH v4 13/16] md/md-bitmap: replace PagePrivate() with page_private() Zi Yan
@ 2026-09-14 2:24 ` Zi Yan
2026-09-14 3:39 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Andrew Morton
` (5 subsequent siblings)
7 siblings, 0 replies; 22+ messages in thread
From: Zi Yan @ 2026-09-14 2:24 UTC (permalink / raw)
To: David Hildenbrand, Matthew Wilcox (Oracle), Andrew Morton,
Muchun Song, Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka,
Mike Rapoport, Suren Baghdasaryan, Michal Hocko, Baolin Wang,
Nico Pache, Ryan Roberts, Dev Jain, Barry Song, Lance Yang,
Usama Arif, Gregory Price, Ying Huang, Alistair Popple,
Johannes Weiner, Qi Zheng, Shakeel Butt, Kairui Song
Cc: linux-mm, linux-kernel, Zi Yan, Song Liu, Yu Kuai, Jan Kara,
Li Nan, Xiao Ni, linux-raid, linux-fsdevel
Only two users (in md-bitmap) use page_buffer() and both can be converted
to use page_private(). Convert both and remove page_buffer().
Assisted-by: LLM
Signed-off-by: Zi Yan <ziy@nvidia.com>
To: Song Liu <song@kernel.org>
To: Yu Kuai <yukuai@fygo.io>
To: Jan Kara <jack@suse.cz>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Li Nan <magiclinan@didiglobal.com>
Cc: Xiao Ni <xiao@kernel.org>
Cc: linux-raid@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/md/md-bitmap.c | 7 +++----
include/linux/buffer_head.h | 6 ------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 84122834b6108..7b706d3e54901 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -516,7 +516,7 @@ static void end_bitmap_write(struct bio *bio)
static void write_file_page(struct bitmap *bitmap, struct page *page, int wait)
{
- struct buffer_head *bh = page_buffers(page);
+ struct buffer_head *bh = (struct buffer_head *)page_private(page);
while (bh && bh->b_blocknr) {
atomic_inc(&bitmap->pending_writes);
@@ -533,12 +533,11 @@ static void write_file_page(struct bitmap *bitmap, struct page *page, int wait)
static void free_buffers(struct page *page)
{
- struct buffer_head *bh;
+ struct buffer_head *bh = (struct buffer_head *)page_private(page);
- if (!page_private(page))
+ if (!bh)
return;
- bh = page_buffers(page);
while (bh) {
struct buffer_head *next = bh->b_this_page;
free_buffer_head(bh);
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index fd2c7115c0542..e47fbd0387b69 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -175,12 +175,6 @@ static inline unsigned long bh_offset(const struct buffer_head *bh)
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)); \
- })
#define folio_buffers(folio) folio_get_private(folio)
void buffer_check_dirty_writeback(struct folio *folio,
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
2026-09-14 2:24 ` [PATCH v4 13/16] md/md-bitmap: replace PagePrivate() with page_private() Zi Yan
2026-09-14 2:24 ` [PATCH v4 14/16] buffer: replace page_buffer() with page_private() and delete it Zi Yan
@ 2026-09-14 3:39 ` Andrew Morton
2026-09-15 17:16 ` Zi Yan
2026-09-14 4:18 ` [PATCH 1/3] md: Use folio_alloc_buffers() Matthew Wilcox (Oracle)
` (4 subsequent siblings)
7 siblings, 1 reply; 22+ messages in thread
From: Andrew Morton @ 2026-09-14 3:39 UTC (permalink / raw)
To: Zi Yan
Cc: David Hildenbrand, Matthew Wilcox (Oracle), Muchun Song,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Baolin Wang, Nico Pache,
Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif,
Gregory Price, Ying Huang, Alistair Popple, Johannes Weiner,
Qi Zheng, Shakeel Butt, Kairui Song, linux-mm, linux-kernel,
Minchan Kim, Sergey Senozhatsky, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Thomas Gleixner,
Borislav Petkov, Dave Hansen, x86, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, H. Peter Anvin, linux-perf-users, Juergen Gross,
Stefano Stabellini, Oleksandr Tyshchenko, xen-devel, Eric Biggers,
Theodore Y. Ts'o, Jaegeuk Kim, linux-fscrypt, Oscar Salvador,
Chao Yu, linux-f2fs-devel, Tal Zussman, Gao Xiang, Jan Kara,
Yue Hu, Jeffle Xu, Sandeep Dhavale, Hongbo Li, Chunhai Guo,
linux-erofs, linux-fsdevel, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Matthew Brost, Joshua Hahn, Rakie Kim,
Byungchul Park, Axel Rasmussen, Yuanchu Xie, Wei Xu,
linux-trace-kernel, Trond Myklebust, Anna Schumaker, linux-nfs,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko, ceph-devel,
Song Liu, Yu Kuai, Li Nan, Xiao Ni, linux-raid,
Richard Weinberger, Zhihao Cheng, linux-mtd, Baoquan He,
Pasha Tatashin, Pratyush Yadav, Jonathan Corbet, Dave Young,
Shuah Khan, kexec, linux-doc
On Sun, 13 Sep 2026 22:23:58 -0400 Zi Yan <ziy@nvidia.com> wrote:
> This patchset removes PG_private to make space for upcoming PG_folio for
> identifying pages from a folio (more details in Note below). Instead of
> checking PG_private, all code is changed to check page/folio->private !=
> NULL instead.
>
> MM people are cc'd on all patches and subsystem people are cc'd on the
> cover letter and corresponding patches.
>
> Patch 6 is picked up separately in f2fs tree, but since mm-new does not
> have it yet, it is sent for MM testing.
AI review claims to have found a pre-existing critical level deadlock
in f2fs:
https://sashiko.dev/#/patchset/20260913-remove-pg_private-v4-0-848550f7574e@nvidia.com
it also had a few things to say about this patchset and, as always,
hugetlb.c.
Thanks, The MM bits appear adequately reviewed and review of the non-MM
bits are, as usual:
Great to have but I won't permit lack of other-than-MM review to
block MM improvements.
So I'll queue it all up and shall push it into -next after a few days.
Acks from non-MM maintainers are appreciated.
If a non-MM patch appears in linux-next I'll autodrop the mm.git copy
of that patch.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 1/3] md: Use folio_alloc_buffers()
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
` (2 preceding siblings ...)
2026-09-14 3:39 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Andrew Morton
@ 2026-09-14 4:18 ` Matthew Wilcox (Oracle)
2026-09-14 4:27 ` sashiko-bot
2026-09-14 13:12 ` David Hildenbrand (Arm)
2026-09-14 4:18 ` [PATCH 2/3] md: Use folio APIs in free_page() Matthew Wilcox (Oracle)
` (3 subsequent siblings)
7 siblings, 2 replies; 22+ messages in thread
From: Matthew Wilcox (Oracle) @ 2026-09-14 4:18 UTC (permalink / raw)
To: Zi Yan; +Cc: Matthew Wilcox (Oracle), linux-raid, linux-mm
Remove the last user of alloc_page_buffers(). This isn't _great_,
but prevents new callers of alloc_page_buffers() existing.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
drivers/md/md-bitmap.c | 5 +++--
fs/buffer.c | 8 --------
include/linux/buffer_head.h | 1 -
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index b8325cb09a37..5f1637f974c1 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -560,6 +560,7 @@ static int read_file_page(struct file *file, unsigned long index,
{
int ret = 0;
struct inode *inode = file_inode(file);
+ struct folio *folio = page_folio(page);
struct buffer_head *bh;
sector_t block, blk_cur;
unsigned long blocksize = i_blocksize(inode);
@@ -567,12 +568,12 @@ static int read_file_page(struct file *file, unsigned long index,
pr_debug("read bitmap file (%dB @ %llu)\n", (int)PAGE_SIZE,
(unsigned long long)index << PAGE_SHIFT);
- bh = alloc_page_buffers(page, blocksize);
+ bh = folio_alloc_buffers(folio, blocksize, GFP_NOFS | __GFP_ACCOUNT);
if (!bh) {
ret = -ENOMEM;
goto out;
}
- attach_page_private(page, bh);
+ folio_attach_private(folio, bh);
blk_cur = index << (PAGE_SHIFT - inode->i_blkbits);
while (bh) {
block = blk_cur;
diff --git a/fs/buffer.c b/fs/buffer.c
index c9342aeb8cdf..367be053d07b 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -781,14 +781,6 @@ struct buffer_head *folio_alloc_buffers(struct folio *folio, unsigned long size,
}
EXPORT_SYMBOL_GPL(folio_alloc_buffers);
-struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size)
-{
- gfp_t gfp = GFP_NOFS | __GFP_ACCOUNT;
-
- return folio_alloc_buffers(page_folio(page), size, gfp);
-}
-EXPORT_SYMBOL_GPL(alloc_page_buffers);
-
static inline void link_dev_buffers(struct folio *folio,
struct buffer_head *head)
{
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 1d55f7770cad..c9918176adaa 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -197,7 +197,6 @@ void folio_set_bh(struct buffer_head *bh, struct folio *folio,
unsigned long offset);
struct buffer_head *folio_alloc_buffers(struct folio *folio, unsigned long size,
gfp_t gfp);
-struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size);
struct buffer_head *create_empty_buffers(struct folio *folio,
unsigned long blocksize, unsigned long b_state);
void end_buffer_read_sync(struct buffer_head *bh, int uptodate);
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 2/3] md: Use folio APIs in free_page()
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
` (3 preceding siblings ...)
2026-09-14 4:18 ` [PATCH 1/3] md: Use folio_alloc_buffers() Matthew Wilcox (Oracle)
@ 2026-09-14 4:18 ` Matthew Wilcox (Oracle)
2026-09-14 4:31 ` sashiko-bot
2026-09-14 13:13 ` David Hildenbrand (Arm)
2026-09-14 4:18 ` [PATCH 3/3] md: Remove the last use of page_buffers() Matthew Wilcox (Oracle)
` (2 subsequent siblings)
7 siblings, 2 replies; 22+ messages in thread
From: Matthew Wilcox (Oracle) @ 2026-09-14 4:18 UTC (permalink / raw)
To: Zi Yan; +Cc: Matthew Wilcox (Oracle), linux-raid, linux-mm
Convert the page to a folio. This removes some of the last uses of a
few page APIs (detach_page_private(), page_buffers()). Replaces two
calls to compound_head() with one.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
drivers/md/md-bitmap.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 5f1637f974c1..7b42db87d536 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -533,19 +533,18 @@ static void write_file_page(struct bitmap *bitmap, struct page *page, int wait)
static void free_buffers(struct page *page)
{
- struct buffer_head *bh;
+ struct folio *folio = page_folio(page);
+ struct buffer_head *bh = folio_detach_private(folio);
- if (!PagePrivate(page))
+ if (!bh)
return;
- bh = page_buffers(page);
while (bh) {
struct buffer_head *next = bh->b_this_page;
free_buffer_head(bh);
bh = next;
}
- detach_page_private(page);
- put_page(page);
+ folio_put(folio);
}
/* read a page from a file.
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 3/3] md: Remove the last use of page_buffers()
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
` (4 preceding siblings ...)
2026-09-14 4:18 ` [PATCH 2/3] md: Use folio APIs in free_page() Matthew Wilcox (Oracle)
@ 2026-09-14 4:18 ` Matthew Wilcox (Oracle)
2026-09-14 4:29 ` sashiko-bot
2026-09-14 13:14 ` David Hildenbrand (Arm)
2026-09-14 4:21 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Matthew Wilcox
2026-09-14 15:30 ` [f2fs-dev] " patchwork-bot+f2fs
7 siblings, 2 replies; 22+ messages in thread
From: Matthew Wilcox (Oracle) @ 2026-09-14 4:18 UTC (permalink / raw)
To: Zi Yan; +Cc: Matthew Wilcox (Oracle), linux-raid, linux-mm
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.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
drivers/md/md-bitmap.c | 3 ++-
include/linux/buffer_head.h | 7 +------
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
index 7b42db87d536..c2528220c406 100644
--- a/drivers/md/md-bitmap.c
+++ b/drivers/md/md-bitmap.c
@@ -516,7 +516,8 @@ static void end_bitmap_write(struct bio *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);
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index c9918176adaa..1d5eb6ba4576 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -175,12 +175,7 @@ static inline unsigned long bh_offset(const struct buffer_head *bh)
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,
--
2.47.3
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
` (5 preceding siblings ...)
2026-09-14 4:18 ` [PATCH 3/3] md: Remove the last use of page_buffers() Matthew Wilcox (Oracle)
@ 2026-09-14 4:21 ` Matthew Wilcox
2026-09-14 13:10 ` David Hildenbrand (Arm)
2026-09-14 15:30 ` [f2fs-dev] " patchwork-bot+f2fs
7 siblings, 1 reply; 22+ messages in thread
From: Matthew Wilcox @ 2026-09-14 4:21 UTC (permalink / raw)
To: Zi Yan
Cc: David Hildenbrand, Andrew Morton, Muchun Song, Lorenzo Stoakes,
Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Baolin Wang, Nico Pache,
Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif,
Gregory Price, Ying Huang, Alistair Popple, Johannes Weiner,
Qi Zheng, Shakeel Butt, Kairui Song, linux-mm, linux-kernel,
Minchan Kim, Sergey Senozhatsky, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Thomas Gleixner,
Borislav Petkov, Dave Hansen, x86, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, H. Peter Anvin, linux-perf-users, Juergen Gross,
Stefano Stabellini, Oleksandr Tyshchenko, xen-devel, Eric Biggers,
Theodore Y. Ts'o, Jaegeuk Kim, linux-fscrypt, Oscar Salvador,
Chao Yu, linux-f2fs-devel, Tal Zussman, Gao Xiang, Jan Kara,
Yue Hu, Jeffle Xu, Sandeep Dhavale, Hongbo Li, Chunhai Guo,
linux-erofs, linux-fsdevel, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Matthew Brost, Joshua Hahn, Rakie Kim,
Byungchul Park, Axel Rasmussen, Yuanchu Xie, Wei Xu,
linux-trace-kernel, Trond Myklebust, Anna Schumaker, linux-nfs,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko, ceph-devel,
Song Liu, Yu Kuai, Li Nan, Xiao Ni, linux-raid,
Richard Weinberger, Zhihao Cheng, linux-mtd, Baoquan He,
Pasha Tatashin, Pratyush Yadav, Jonathan Corbet, Dave Young,
Shuah Khan, kexec, linux-doc
On Sun, Sep 13, 2026 at 10:23:58PM -0400, Zi Yan wrote:
> md/md-bitmap: replace PagePrivate() with page_private()
> buffer: replace page_buffer() with page_private() and delete it
Sorry, looks like I screwed up git send-email usage. I'm proposing
replacing these two patches wth the three I sent.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/3] md: Use folio_alloc_buffers()
2026-09-14 4:18 ` [PATCH 1/3] md: Use folio_alloc_buffers() Matthew Wilcox (Oracle)
@ 2026-09-14 4:27 ` sashiko-bot
2026-09-14 13:12 ` David Hildenbrand (Arm)
1 sibling, 0 replies; 22+ messages in thread
From: sashiko-bot @ 2026-09-14 4:27 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: yukuai, linux-raid
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Severe memory leak of bitmap pages in free_buffers() when PagePrivate is not set.
--
commit 9822ba9b718b51ce47732b5412e326f063b30c60
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
md: Use folio_alloc_buffers()
This commit removes the last user of alloc_page_buffers(), replacing it
with folio_alloc_buffers() to prevent new callers from existing.
> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
> index b8325cb09a371..5f1637f974c15 100644
> --- a/drivers/md/md-bitmap.c
> +++ b/drivers/md/md-bitmap.c
> @@ -560,6 +560,7 @@ static int read_file_page(struct file *file, unsigned long index,
> {
> int ret = 0;
> struct inode *inode = file_inode(file);
> + struct folio *folio = page_folio(page);
> struct buffer_head *bh;
> sector_t block, blk_cur;
> unsigned long blocksize = i_blocksize(inode);
> @@ -567,12 +568,12 @@ static int read_file_page(struct file *file, unsigned long index,
> pr_debug("read bitmap file (%dB @ %llu)\n", (int)PAGE_SIZE,
> (unsigned long long)index << PAGE_SHIFT);
>
> - bh = alloc_page_buffers(page, blocksize);
> + bh = folio_alloc_buffers(folio, blocksize, GFP_NOFS | __GFP_ACCOUNT);
> if (!bh) {
> ret = -ENOMEM;
> goto out;
> }
> - attach_page_private(page, bh);
> + folio_attach_private(folio, bh);
[Severity: High]
This isn't a bug introduced by this patch, but it is a severe pre-existing
resource leak in the cleanup path for these pages.
md_bitmap_storage_alloc() allocates pages via alloc_page() for
store->filemap. On teardown, md_bitmap_file_unmap() iterates over these
pages and calls free_buffers() to clean them up.
For internal bitmaps, read_sb_page() uses raw bios and never attaches
buffer heads, so the pages never have the PagePrivate flag set.
When this happens, free_buffers() returns early:
static void free_buffers(struct page *page)
{
struct buffer_head *bh;
if (!PagePrivate(page))
return;
...
detach_page_private(page);
put_page(page);
}
Does this early return mistakenly skip the final put_page() call,
permanently leaking the page when no buffer heads are attached?
This leaks memory pages allocated for the MD bitmap every time an array
with an internal bitmap is stopped, potentially leading to memory
exhaustion.
I verified that the follow-up patches in this series (which migrate this
function to the folio API) faithfully reproduce the exact same leak by
returning early when bh is NULL before calling folio_put(folio).
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260913-remove-pg_private-v4-0-848550f7574e@nvidia.com?part=1
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 3/3] md: Remove the last use of page_buffers()
2026-09-14 4:18 ` [PATCH 3/3] md: Remove the last use of page_buffers() Matthew Wilcox (Oracle)
@ 2026-09-14 4:29 ` sashiko-bot
2026-09-14 13:14 ` David Hildenbrand (Arm)
1 sibling, 0 replies; 22+ messages in thread
From: sashiko-bot @ 2026-09-14 4:29 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: yukuai, linux-raid
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Memory leak of bitmap pages in `free_buffers()` when unmapping an internal block-device bitmap or on error paths for file-backed bitmaps.
--
commit 5c27b3beb1da589c8d8b3b4113d43873e56ed7da
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
md: Remove the last use of page_buffers()
This commit converts the page to a folio in write_file_page() and uses
folio_buffers() instead of page_buffers(). This change prepares the
md-bitmap codebase for a later conversion from pages to folios.
> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
> index 7b42db87d536d..c2528220c406d 100644
> --- a/drivers/md/md-bitmap.c
> +++ b/drivers/md/md-bitmap.c
> @@ -516,7 +516,8 @@ static void end_bitmap_write(struct bio *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);
[Severity: High]
This is a pre-existing issue, but since this code is being converted to use
folios, does free_buffers() leak the folio when unmapping an internal
block-device bitmap or on error paths for file-backed bitmaps?
In md_bitmap_storage_alloc(), memory for store->filemap is allocated using
alloc_page(), which sets the baseline refcount to 1. For internal
block-device bitmaps, the pages are read using read_sb_page() which does
not attach buffer_head structures or set the folio private flag.
During array teardown, md_bitmap_file_unmap() iterates over store->filemap
and calls free_buffers():
static void free_buffers(struct page *page)
{
struct folio *folio = page_folio(page);
struct buffer_head *bh = folio_detach_private(folio);
if (!bh)
return;
...
folio_put(folio);
}
Since folio_detach_private() returns NULL here, the early return skips the
final folio_put(). Over time, this could accumulate to megabytes of leaked
memory if an administrator repeatedly starts and stops md arrays with
internal bitmaps.
Could this early return be updated to ensure the folio reference is properly
dropped even when there are no buffers attached?
>
> while (bh && bh->b_blocknr) {
> atomic_inc(&bitmap->pending_writes);
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260913-remove-pg_private-v4-0-848550f7574e@nvidia.com?part=3
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/3] md: Use folio APIs in free_page()
2026-09-14 4:18 ` [PATCH 2/3] md: Use folio APIs in free_page() Matthew Wilcox (Oracle)
@ 2026-09-14 4:31 ` sashiko-bot
2026-09-14 16:21 ` Matthew Wilcox
2026-09-14 13:13 ` David Hildenbrand (Arm)
1 sibling, 1 reply; 22+ messages in thread
From: sashiko-bot @ 2026-09-14 4:31 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: yukuai, linux-raid
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Memory leak of internal bitmap pages and uninitialized file bitmap pages during teardown or error handling due to an early return in free_buffers().
--
commit d68f524234e61e6567e52a27e09b9d2546ab54af
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
md: Use folio APIs in free_page()
This commit converts the page to a folio, removing some of the last uses of
a few page APIs and replacing two calls to compound_head() with one.
> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
> index 5f1637f974c15..7b42db87d536d 100644
> --- a/drivers/md/md-bitmap.c
> +++ b/drivers/md/md-bitmap.c
> @@ -533,19 +533,18 @@ static void write_file_page(struct bitmap *bitmap, struct page *page, int wait)
>
> static void free_buffers(struct page *page)
> {
> - struct buffer_head *bh;
> + struct folio *folio = page_folio(page);
> + struct buffer_head *bh = folio_detach_private(folio);
>
> - if (!PagePrivate(page))
> + if (!bh)
> return;
[Severity: High]
This is a pre-existing issue, but this early return skips the folio_put()
required to drop the base allocation reference for pages that do not have
buffers attached.
For internal bitmaps, pages are allocated via alloc_page() with a refcount
of 1 in md_bitmap_storage_alloc():
drivers/md/md-bitmap.c:md_bitmap_storage_alloc() {
...
store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO);
...
}
During MD array teardown or failure, md_bitmap_file_unmap() calls
free_buffers() on these pages:
drivers/md/md-bitmap.c:md_bitmap_file_unmap() {
...
free_buffers(map[pages]);
...
}
Because internal bitmap pages don't have buffers attached, (!bh) evaluates
to true, triggering the early return and completely bypassing the folio_put()
at the end of the function.
This permanently leaks the pages allocated for the internal bitmap's filemap
and superblock.
Does this early return need to be updated so that folio_put() is still
called for folios without buffers?
> - bh = page_buffers(page);
> while (bh) {
> struct buffer_head *next = bh->b_this_page;
> free_buffer_head(bh);
> bh = next;
> }
> - detach_page_private(page);
> - put_page(page);
> + folio_put(folio);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260913-remove-pg_private-v4-0-848550f7574e@nvidia.com?part=2
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead
2026-09-14 4:21 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Matthew Wilcox
@ 2026-09-14 13:10 ` David Hildenbrand (Arm)
0 siblings, 0 replies; 22+ messages in thread
From: David Hildenbrand (Arm) @ 2026-09-14 13:10 UTC (permalink / raw)
To: Matthew Wilcox, Zi Yan
Cc: Andrew Morton, Muchun Song, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Baolin Wang, Nico Pache, Ryan Roberts, Dev Jain, Barry Song,
Lance Yang, Usama Arif, Gregory Price, Ying Huang,
Alistair Popple, Johannes Weiner, Qi Zheng, Shakeel Butt,
Kairui Song, linux-mm, linux-kernel, Minchan Kim,
Sergey Senozhatsky, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Thomas Gleixner,
Borislav Petkov, Dave Hansen, x86, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, H. Peter Anvin, linux-perf-users, Juergen Gross,
Stefano Stabellini, Oleksandr Tyshchenko, xen-devel, Eric Biggers,
Theodore Y. Ts'o, Jaegeuk Kim, linux-fscrypt, Oscar Salvador,
Chao Yu, linux-f2fs-devel, Tal Zussman, Gao Xiang, Jan Kara,
Yue Hu, Jeffle Xu, Sandeep Dhavale, Hongbo Li, Chunhai Guo,
linux-erofs, linux-fsdevel, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Matthew Brost, Joshua Hahn, Rakie Kim,
Byungchul Park, Axel Rasmussen, Yuanchu Xie, Wei Xu,
linux-trace-kernel, Trond Myklebust, Anna Schumaker, linux-nfs,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko, ceph-devel,
Song Liu, Yu Kuai, Li Nan, Xiao Ni, linux-raid,
Richard Weinberger, Zhihao Cheng, linux-mtd, Baoquan He,
Pasha Tatashin, Pratyush Yadav, Jonathan Corbet, Dave Young,
Shuah Khan, kexec, linux-doc
On 9/14/26 06:21, Matthew Wilcox wrote:
> On Sun, Sep 13, 2026 at 10:23:58PM -0400, Zi Yan wrote:
>> md/md-bitmap: replace PagePrivate() with page_private()
>> buffer: replace page_buffer() with page_private() and delete it
>
> Sorry, looks like I screwed up git send-email usage. I'm proposing
> replacing these two patches wth the three I sent.
For everybody CCed wondering "which patches":
https://lore.kernel.org/r/20260914041830.2072626-1-willy@infradead.org
https://lore.kernel.org/r/20260914041830.2072626-2-willy@infradead.org
https://lore.kernel.org/r/20260914041830.2072626-3-willy@infradead.org
--
Cheers,
David
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/3] md: Use folio_alloc_buffers()
2026-09-14 4:18 ` [PATCH 1/3] md: Use folio_alloc_buffers() Matthew Wilcox (Oracle)
2026-09-14 4:27 ` sashiko-bot
@ 2026-09-14 13:12 ` David Hildenbrand (Arm)
2026-09-14 13:17 ` Matthew Wilcox
1 sibling, 1 reply; 22+ messages in thread
From: David Hildenbrand (Arm) @ 2026-09-14 13:12 UTC (permalink / raw)
To: Matthew Wilcox (Oracle), Zi Yan; +Cc: linux-raid, linux-mm
On 9/14/26 06:18, Matthew Wilcox (Oracle) wrote:
> Remove the last user of alloc_page_buffers(). This isn't _great_,
You should tell us "why" this isn't great.
Because we're allocating folios although these things are not actually folios? I
can only speculate :)
Code itself looks good.
--
Cheers,
David
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/3] md: Use folio APIs in free_page()
2026-09-14 4:18 ` [PATCH 2/3] md: Use folio APIs in free_page() Matthew Wilcox (Oracle)
2026-09-14 4:31 ` sashiko-bot
@ 2026-09-14 13:13 ` David Hildenbrand (Arm)
1 sibling, 0 replies; 22+ messages in thread
From: David Hildenbrand (Arm) @ 2026-09-14 13:13 UTC (permalink / raw)
To: Matthew Wilcox (Oracle), Zi Yan; +Cc: linux-raid, linux-mm
On 9/14/26 06:18, Matthew Wilcox (Oracle) wrote:
> Convert the page to a folio. This removes some of the last uses of a
> few page APIs (detach_page_private(), page_buffers()). Replaces two
> calls to compound_head() with one.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 3/3] md: Remove the last use of page_buffers()
2026-09-14 4:18 ` [PATCH 3/3] md: Remove the last use of page_buffers() Matthew Wilcox (Oracle)
2026-09-14 4:29 ` sashiko-bot
@ 2026-09-14 13:14 ` David Hildenbrand (Arm)
1 sibling, 0 replies; 22+ messages in thread
From: David Hildenbrand (Arm) @ 2026-09-14 13:14 UTC (permalink / raw)
To: Matthew Wilcox (Oracle), Zi Yan; +Cc: linux-raid, linux-mm
On 9/14/26 06:18, Matthew Wilcox (Oracle) wrote:
> 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.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> ---
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/3] md: Use folio_alloc_buffers()
2026-09-14 13:12 ` David Hildenbrand (Arm)
@ 2026-09-14 13:17 ` Matthew Wilcox
2026-09-14 13:20 ` David Hildenbrand (Arm)
0 siblings, 1 reply; 22+ messages in thread
From: Matthew Wilcox @ 2026-09-14 13:17 UTC (permalink / raw)
To: David Hildenbrand (Arm); +Cc: Zi Yan, linux-raid, linux-mm
On Mon, Sep 14, 2026 at 03:12:31PM +0200, David Hildenbrand (Arm) wrote:
> On 9/14/26 06:18, Matthew Wilcox (Oracle) wrote:
> > Remove the last user of alloc_page_buffers(). This isn't _great_,
>
> You should tell us "why" this isn't great.
>
> Because we're allocating folios although these things are not actually folios? I
> can only speculate :)
Well, we actually aren't allocating folios in md-bitmap:
for ( ; pnum < num_pages; pnum++) {
store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO);
and it's not clear to me that we should be allocating folios; they're
internal memory to the md-bitmap code that are never mapped to userspace,
nor enter the page cache. But they do have buffer heads attached to them.
The md-bitmap code probably needs to be rewritten to not use buffer heads
at all, but then I hear from some people that it's scheduled for deletion,
so don't spend any time on it. But I can't find anything official about
that anywhere.
> Code itself looks good.
Thanks!
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/3] md: Use folio_alloc_buffers()
2026-09-14 13:17 ` Matthew Wilcox
@ 2026-09-14 13:20 ` David Hildenbrand (Arm)
2026-09-14 14:36 ` Zi Yan
0 siblings, 1 reply; 22+ messages in thread
From: David Hildenbrand (Arm) @ 2026-09-14 13:20 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Zi Yan, linux-raid, linux-mm
On 9/14/26 15:17, Matthew Wilcox wrote:
> On Mon, Sep 14, 2026 at 03:12:31PM +0200, David Hildenbrand (Arm) wrote:
>> On 9/14/26 06:18, Matthew Wilcox (Oracle) wrote:
>>> Remove the last user of alloc_page_buffers(). This isn't _great_,
>>
>> You should tell us "why" this isn't great.
>>
>> Because we're allocating folios although these things are not actually folios? I
>> can only speculate :)
>
> Well, we actually aren't allocating folios in md-bitmap:
>
> for ( ; pnum < num_pages; pnum++) {
> store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO);
>
> and it's not clear to me that we should be allocating folios; they're
> internal memory to the md-bitmap code that are never mapped to userspace,
> nor enter the page cache. But they do have buffer heads attached to them.
Confusing indeed.
>
> The md-bitmap code probably needs to be rewritten to not use buffer heads
> at all, but then I hear from some people that it's scheduled for deletion,
> so don't spend any time on it. But I can't find anything official about
> that anywhere.
>
>> Code itself looks good.
>
> Thanks!
I'd assume Zi will pick up your patches and can massage the patch description to
summarize why folios are awkward here, but that cleaning this up is future work.
--
Cheers,
David
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/3] md: Use folio_alloc_buffers()
2026-09-14 13:20 ` David Hildenbrand (Arm)
@ 2026-09-14 14:36 ` Zi Yan
0 siblings, 0 replies; 22+ messages in thread
From: Zi Yan @ 2026-09-14 14:36 UTC (permalink / raw)
To: David Hildenbrand (Arm); +Cc: Matthew Wilcox, linux-raid, linux-mm
On 14 Sep 2026, at 9:20, David Hildenbrand (Arm) wrote:
> On 9/14/26 15:17, Matthew Wilcox wrote:
>> On Mon, Sep 14, 2026 at 03:12:31PM +0200, David Hildenbrand (Arm) wrote:
>>> On 9/14/26 06:18, Matthew Wilcox (Oracle) wrote:
>>>> Remove the last user of alloc_page_buffers(). This isn't _great_,
>>>
>>> You should tell us "why" this isn't great.
>>>
>>> Because we're allocating folios although these things are not actually folios? I
>>> can only speculate :)
>>
>> Well, we actually aren't allocating folios in md-bitmap:
>>
>> for ( ; pnum < num_pages; pnum++) {
>> store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO);
>>
>> and it's not clear to me that we should be allocating folios; they're
>> internal memory to the md-bitmap code that are never mapped to userspace,
>> nor enter the page cache. But they do have buffer heads attached to them.
>
> Confusing indeed.
>
>>
>> The md-bitmap code probably needs to be rewritten to not use buffer heads
>> at all, but then I hear from some people that it's scheduled for deletion,
>> so don't spend any time on it. But I can't find anything official about
>> that anywhere.
>>
>>> Code itself looks good.
>>
>> Thanks!
>
> I'd assume Zi will pick up your patches and can massage the patch description to
> summarize why folios are awkward here, but that cleaning this up is future work.
Will do the replacement.
The new description:
Remove the last user of alloc_page_buffers(). Use folio_alloc_buffers()
instead, since alloc_page_buffers() is a wrap over it. Although
the pages used in md-bitmap are not folios, as they are not mapped
into userspace nor enter the page cache, but they still have buffer heads
attached. Cleaning up the code to not use buffer heads is future work.
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [f2fs-dev] [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
` (6 preceding siblings ...)
2026-09-14 4:21 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Matthew Wilcox
@ 2026-09-14 15:30 ` patchwork-bot+f2fs
7 siblings, 0 replies; 22+ messages in thread
From: patchwork-bot+f2fs @ 2026-09-14 15:30 UTC (permalink / raw)
To: Zi Yan
Cc: david, willy, akpm, muchun.song, ljs, liam, vbabka, rppt, surenb,
mhocko, baolin.wang, nico.pache, ryan.roberts, dev.jain, baohua,
lance.yang, usama.arif, gourry, ying.huang, apopple, hannes,
qi.zheng, shakeel.butt, kasong, mark.rutland, irogers, jack,
linux-doc, amarkuze, peterz, kexec, dave.hansen, ruirui.yang,
adrian.hunter, linux-mm, hongbohbli, hpa, guochunhai, skhan,
tz2294, baoquan.he, matthew.brost, anna, sstabellini, zbestahu,
rakie.kim, minchan, richard, x86, ceph-devel, ebiggers,
alexander.shishkin, mingo, slava, weixugc, yukuai, xen-devel,
xiang, magiclinan, mhiramat, joshua.hahnjy, xiao, byungchul,
james.clark, acme, linux-raid, linux-fscrypt, bp, rostedt,
linux-mtd, axelrasmussen, jefflexu, namhyung, jaegeuk, yuanchu,
idryomov, osalvador, jgross, pratyush, linux-nfs, tytso,
oleksandr_tyshchenko, song, corbet, pasha.tatashin, linux-kernel,
linux-f2fs-devel, linux-perf-users, senozhatsky, tglx, jolsa,
linux-fsdevel, mathieu.desnoyers, linux-trace-kernel, linux-erofs,
trondmy
Hello:
This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Sun, 13 Sep 2026 22:23:58 -0400 you wrote:
> Hi all,
>
> This patchset removes PG_private to make space for upcoming PG_folio for
> identifying pages from a folio (more details in Note below). Instead of
> checking PG_private, all code is changed to check page/folio->private !=
> NULL instead.
>
> [...]
Here is the summary with links:
- [f2fs-dev,v4,06/16] f2fs: stop using PG_private
https://git.kernel.org/jaegeuk/f2fs/c/60105162524e
- [f2fs-dev,v4,07/16] f2fs: convert the ->private flag helpers to folio-only
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/3] md: Use folio APIs in free_page()
2026-09-14 4:31 ` sashiko-bot
@ 2026-09-14 16:21 ` Matthew Wilcox
2026-09-14 16:25 ` Zi Yan
0 siblings, 1 reply; 22+ messages in thread
From: Matthew Wilcox @ 2026-09-14 16:21 UTC (permalink / raw)
To: sashiko-reviews; +Cc: yukuai, linux-raid, Zi Yan, David Hildenbrand, linux-mm
On Mon, Sep 14, 2026 at 04:31:29AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>
> Pre-existing issues:
> - [High] Memory leak of internal bitmap pages and uninitialized file bitmap pages during teardown or error handling due to an early return in free_buffers().
> --
Yes, I thought the early return looked weird. I just believed that I
hadn't looked into the code enough to understand why it looked weird but
was right. Since the AI says it's wrong, I'm happy to believe it's wrong.
It's probably not really a high seveirty problem because most RAIDs are
set up once and then never removed, so the leak doesn't matter.
The other thing that looks weird is that this code believes the b_this_page
list is NULL terminated. Most loops over "all BHs attached to a folio"
have a circular list. However, that is established by link_dev_buffers()
which is not called by md-bitmap. So it's correct, even though weird.
The good news is this is an easy fix:
@@ -536,9 +536,6 @@ static void free_buffers(struct page *page)
struct folio *folio = page_folio(page);
struct buffer_head *bh = folio_detach_private(folio);
- if (!bh)
- return;
-
while (bh) {
struct buffer_head *next = bh->b_this_page;
free_buffer_head(bh);
I can submit a new vrsion, or Zi can just pick this up.
> commit d68f524234e61e6567e52a27e09b9d2546ab54af
> Author: Matthew Wilcox (Oracle) <willy@infradead.org>
>
> md: Use folio APIs in free_page()
>
> This commit converts the page to a folio, removing some of the last uses of
> a few page APIs and replacing two calls to compound_head() with one.
>
> > diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
> > index 5f1637f974c15..7b42db87d536d 100644
> > --- a/drivers/md/md-bitmap.c
> > +++ b/drivers/md/md-bitmap.c
> > @@ -533,19 +533,18 @@ static void write_file_page(struct bitmap *bitmap, struct page *page, int wait)
> >
> > static void free_buffers(struct page *page)
> > {
> > - struct buffer_head *bh;
> > + struct folio *folio = page_folio(page);
> > + struct buffer_head *bh = folio_detach_private(folio);
> >
> > - if (!PagePrivate(page))
> > + if (!bh)
> > return;
>
> [Severity: High]
> This is a pre-existing issue, but this early return skips the folio_put()
> required to drop the base allocation reference for pages that do not have
> buffers attached.
>
> For internal bitmaps, pages are allocated via alloc_page() with a refcount
> of 1 in md_bitmap_storage_alloc():
>
> drivers/md/md-bitmap.c:md_bitmap_storage_alloc() {
> ...
> store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO);
> ...
> }
>
> During MD array teardown or failure, md_bitmap_file_unmap() calls
> free_buffers() on these pages:
>
> drivers/md/md-bitmap.c:md_bitmap_file_unmap() {
> ...
> free_buffers(map[pages]);
> ...
> }
>
> Because internal bitmap pages don't have buffers attached, (!bh) evaluates
> to true, triggering the early return and completely bypassing the folio_put()
> at the end of the function.
>
> This permanently leaks the pages allocated for the internal bitmap's filemap
> and superblock.
>
> Does this early return need to be updated so that folio_put() is still
> called for folios without buffers?
>
> > - bh = page_buffers(page);
> > while (bh) {
> > struct buffer_head *next = bh->b_this_page;
> > free_buffer_head(bh);
> > bh = next;
> > }
> > - detach_page_private(page);
> > - put_page(page);
> > + folio_put(folio);
> > }
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260913-remove-pg_private-v4-0-848550f7574e@nvidia.com?part=2
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/3] md: Use folio APIs in free_page()
2026-09-14 16:21 ` Matthew Wilcox
@ 2026-09-14 16:25 ` Zi Yan
0 siblings, 0 replies; 22+ messages in thread
From: Zi Yan @ 2026-09-14 16:25 UTC (permalink / raw)
To: Matthew Wilcox
Cc: sashiko-reviews, yukuai, linux-raid, David Hildenbrand, linux-mm
On 14 Sep 2026, at 12:21, Matthew Wilcox wrote:
> On Mon, Sep 14, 2026 at 04:31:29AM +0000, sashiko-bot@kernel.org wrote:
>> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>>
>> Pre-existing issues:
>> - [High] Memory leak of internal bitmap pages and uninitialized file bitmap pages during teardown or error handling due to an early return in free_buffers().
>> --
>
> Yes, I thought the early return looked weird. I just believed that I
> hadn't looked into the code enough to understand why it looked weird but
> was right. Since the AI says it's wrong, I'm happy to believe it's wrong.
> It's probably not really a high seveirty problem because most RAIDs are
> set up once and then never removed, so the leak doesn't matter.
>
> The other thing that looks weird is that this code believes the b_this_page
> list is NULL terminated. Most loops over "all BHs attached to a folio"
> have a circular list. However, that is established by link_dev_buffers()
> which is not called by md-bitmap. So it's correct, even though weird.
>
> The good news is this is an easy fix:
>
> @@ -536,9 +536,6 @@ static void free_buffers(struct page *page)
> struct folio *folio = page_folio(page);
> struct buffer_head *bh = folio_detach_private(folio);
>
> - if (!bh)
> - return;
> -
> while (bh) {
> struct buffer_head *next = bh->b_this_page;
> free_buffer_head(bh);
>
> I can submit a new vrsion, or Zi can just pick this up.
I can fold this into your patch. Or should this be sent separately
as a fix and maybe a backport?
>
>> commit d68f524234e61e6567e52a27e09b9d2546ab54af
>> Author: Matthew Wilcox (Oracle) <willy@infradead.org>
>>
>> md: Use folio APIs in free_page()
>>
>> This commit converts the page to a folio, removing some of the last uses of
>> a few page APIs and replacing two calls to compound_head() with one.
>>
>>> diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
>>> index 5f1637f974c15..7b42db87d536d 100644
>>> --- a/drivers/md/md-bitmap.c
>>> +++ b/drivers/md/md-bitmap.c
>>> @@ -533,19 +533,18 @@ static void write_file_page(struct bitmap *bitmap, struct page *page, int wait)
>>>
>>> static void free_buffers(struct page *page)
>>> {
>>> - struct buffer_head *bh;
>>> + struct folio *folio = page_folio(page);
>>> + struct buffer_head *bh = folio_detach_private(folio);
>>>
>>> - if (!PagePrivate(page))
>>> + if (!bh)
>>> return;
>>
>> [Severity: High]
>> This is a pre-existing issue, but this early return skips the folio_put()
>> required to drop the base allocation reference for pages that do not have
>> buffers attached.
>>
>> For internal bitmaps, pages are allocated via alloc_page() with a refcount
>> of 1 in md_bitmap_storage_alloc():
>>
>> drivers/md/md-bitmap.c:md_bitmap_storage_alloc() {
>> ...
>> store->filemap[pnum] = alloc_page(GFP_KERNEL|__GFP_ZERO);
>> ...
>> }
>>
>> During MD array teardown or failure, md_bitmap_file_unmap() calls
>> free_buffers() on these pages:
>>
>> drivers/md/md-bitmap.c:md_bitmap_file_unmap() {
>> ...
>> free_buffers(map[pages]);
>> ...
>> }
>>
>> Because internal bitmap pages don't have buffers attached, (!bh) evaluates
>> to true, triggering the early return and completely bypassing the folio_put()
>> at the end of the function.
>>
>> This permanently leaks the pages allocated for the internal bitmap's filemap
>> and superblock.
>>
>> Does this early return need to be updated so that folio_put() is still
>> called for folios without buffers?
>>
>>> - bh = page_buffers(page);
>>> while (bh) {
>>> struct buffer_head *next = bh->b_this_page;
>>> free_buffer_head(bh);
>>> bh = next;
>>> }
>>> - detach_page_private(page);
>>> - put_page(page);
>>> + folio_put(folio);
>>> }
>>
>> --
>> Sashiko AI review · https://sashiko.dev/#/patchset/20260913-remove-pg_private-v4-0-848550f7574e@nvidia.com?part=2
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead
2026-09-14 3:39 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Andrew Morton
@ 2026-09-15 17:16 ` Zi Yan
0 siblings, 0 replies; 22+ messages in thread
From: Zi Yan @ 2026-09-15 17:16 UTC (permalink / raw)
To: Andrew Morton
Cc: David Hildenbrand, Matthew Wilcox (Oracle), Muchun Song,
Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka, Mike Rapoport,
Suren Baghdasaryan, Michal Hocko, Baolin Wang, Nico Pache,
Ryan Roberts, Dev Jain, Barry Song, Lance Yang, Usama Arif,
Gregory Price, Ying Huang, Alistair Popple, Johannes Weiner,
Qi Zheng, Shakeel Butt, Kairui Song, linux-mm, linux-kernel,
Minchan Kim, Sergey Senozhatsky, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Namhyung Kim, Thomas Gleixner,
Borislav Petkov, Dave Hansen, x86, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Ian Rogers, Adrian Hunter,
James Clark, H. Peter Anvin, linux-perf-users, Juergen Gross,
Stefano Stabellini, Oleksandr Tyshchenko, xen-devel, Eric Biggers,
Theodore Y. Ts'o, Jaegeuk Kim, linux-fscrypt, Oscar Salvador,
Chao Yu, linux-f2fs-devel, Tal Zussman, Gao Xiang, Jan Kara,
Yue Hu, Jeffle Xu, Sandeep Dhavale, Hongbo Li, Chunhai Guo,
linux-erofs, linux-fsdevel, Steven Rostedt, Masami Hiramatsu,
Mathieu Desnoyers, Matthew Brost, Joshua Hahn, Rakie Kim,
Byungchul Park, Axel Rasmussen, Yuanchu Xie, Wei Xu,
linux-trace-kernel, Trond Myklebust, Anna Schumaker, linux-nfs,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko, ceph-devel,
Song Liu, Yu Kuai, Li Nan, Xiao Ni, linux-raid,
Richard Weinberger, Zhihao Cheng, linux-mtd, Baoquan He,
Pasha Tatashin, Pratyush Yadav, Jonathan Corbet, Dave Young,
Shuah Khan, kexec, linux-doc
On 13 Sep 2026, at 23:39, Andrew Morton wrote:
> On Sun, 13 Sep 2026 22:23:58 -0400 Zi Yan <ziy@nvidia.com> wrote:
>
>> This patchset removes PG_private to make space for upcoming PG_folio for
>> identifying pages from a folio (more details in Note below). Instead of
>> checking PG_private, all code is changed to check page/folio->private !=
>> NULL instead.
>>
>> MM people are cc'd on all patches and subsystem people are cc'd on the
>> cover letter and corresponding patches.
>>
>> Patch 6 is picked up separately in f2fs tree, but since mm-new does not
>> have it yet, it is sent for MM testing.
>
> AI review claims to have found a pre-existing critical level deadlock
> in f2fs:
>
> https://sashiko.dev/#/patchset/20260913-remove-pg_private-v4-0-848550f7574e@nvidia.com
>
> it also had a few things to say about this patchset and, as always,
> hugetlb.c.
It seems that Sashiko overwrote my patch reviews with the reviews to
Matthew’s md patches. :/ I wonder if there is a way of recovering them.
>
>
> Thanks, The MM bits appear adequately reviewed and review of the non-MM
> bits are, as usual:
>
> Great to have but I won't permit lack of other-than-MM review to
> block MM improvements.
>
> So I'll queue it all up and shall push it into -next after a few days.
>
> Acks from non-MM maintainers are appreciated.
>
> If a non-MM patch appears in linux-next I'll autodrop the mm.git copy
> of that patch.
Thanks.
Best Regards,
Yan, Zi
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2026-09-15 17:16 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 2:23 [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Zi Yan
2026-09-14 2:24 ` [PATCH v4 13/16] md/md-bitmap: replace PagePrivate() with page_private() Zi Yan
2026-09-14 2:24 ` [PATCH v4 14/16] buffer: replace page_buffer() with page_private() and delete it Zi Yan
2026-09-14 3:39 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Andrew Morton
2026-09-15 17:16 ` Zi Yan
2026-09-14 4:18 ` [PATCH 1/3] md: Use folio_alloc_buffers() Matthew Wilcox (Oracle)
2026-09-14 4:27 ` sashiko-bot
2026-09-14 13:12 ` David Hildenbrand (Arm)
2026-09-14 13:17 ` Matthew Wilcox
2026-09-14 13:20 ` David Hildenbrand (Arm)
2026-09-14 14:36 ` Zi Yan
2026-09-14 4:18 ` [PATCH 2/3] md: Use folio APIs in free_page() Matthew Wilcox (Oracle)
2026-09-14 4:31 ` sashiko-bot
2026-09-14 16:21 ` Matthew Wilcox
2026-09-14 16:25 ` Zi Yan
2026-09-14 13:13 ` David Hildenbrand (Arm)
2026-09-14 4:18 ` [PATCH 3/3] md: Remove the last use of page_buffers() Matthew Wilcox (Oracle)
2026-09-14 4:29 ` sashiko-bot
2026-09-14 13:14 ` David Hildenbrand (Arm)
2026-09-14 4:21 ` [PATCH v4 00/16] Remove PG_private by using page/folio->private checks instead Matthew Wilcox
2026-09-14 13:10 ` David Hildenbrand (Arm)
2026-09-14 15:30 ` [f2fs-dev] " patchwork-bot+f2fs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox