* [PATCH v2 0/4] mm: Remove stray references to pagevec
@ 2026-02-25 23:44 Tal Zussman
2026-02-25 23:44 ` [PATCH v2 1/4] mm: Remove stray references to struct pagevec Tal Zussman
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Tal Zussman @ 2026-02-25 23:44 UTC (permalink / raw)
To: David Howells, Marc Dionne, Jaegeuk Kim, Chao Yu, Andrew Morton,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
Barry Song, Matthew Wilcox, Dan Williams, Jan Kara,
Alexander Viro, Christian Brauner, Theodore Ts'o
Cc: Andreas Dilger, Paulo Alcantara, Trond Myklebust, Anna Schumaker,
Mark Fasheh, Joel Becker, Joseph Qi, Steve French,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, Chris Mason, David Sterba,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko,
Andreas Gruenbacher, Muchun Song, Oscar Salvador,
Ryusuke Konishi, Darrick J. Wong, Chuck Lever, Jeff Layton,
NeilBrown, Olga Kornievskaia, Dai Ngo, Jason Gunthorpe,
John Hubbard, Peter Xu, Johannes Weiner, Roman Gushchin,
Shakeel Butt, Jann Horn, Pedro Falcato, Brendan Jackman, Zi Yan,
Hugh Dickins, Baolin Wang, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Qi Zheng, linux-afs, linux-kernel, linux-f2fs-devel, linux-mm,
linux-fsdevel, nvdimm, linux-ext4, netfs, linux-nfs, ocfs2-devel,
linux-cifs, samba-technical, dri-devel, intel-gfx, linux-btrfs,
ceph-devel, gfs2, linux-nilfs, linux-xfs, cgroups, Tal Zussman
struct pagevec was removed in commit 1e0877d58b1e ("mm: remove struct
pagevec"). Remove any stray references to it and rename relevant files
and macros accordingly.
While at it, remove unnecessary #includes of pagevec.h (now
folio_batch.h) in .c files. There are probably more of these that could
be removed in .h files, but those are more complex to verify.
---
Changes in v2:
- Add tags from Matthew, David, and Chris (thanks!).
- Add 3 new patches with more cleanups.
- Link to v1: https://lore.kernel.org/r/20260225-pagevec_cleanup-v1-1-38e2246363d2@columbia.edu
---
Tal Zussman (4):
mm: Remove stray references to struct pagevec
fs: Remove unncessary pagevec.h includes
folio_batch: Rename pagevec.h to folio_batch.h
folio_batch: Rename PAGEVEC_SIZE to FOLIO_BATCH_SIZE
MAINTAINERS | 1 +
drivers/gpu/drm/drm_gem.c | 2 +-
drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
drivers/gpu/drm/i915/gt/intel_gtt.h | 2 +-
drivers/gpu/drm/i915/i915_gpu_error.c | 2 +-
fs/afs/internal.h | 1 -
fs/afs/write.c | 1 -
fs/btrfs/compression.c | 2 +-
fs/btrfs/extent_io.c | 6 +++---
fs/btrfs/tests/extent-io-tests.c | 2 +-
fs/buffer.c | 2 +-
fs/ceph/addr.c | 2 +-
fs/dax.c | 1 -
fs/ext4/file.c | 1 -
fs/ext4/inode.c | 2 +-
fs/ext4/page-io.c | 1 -
fs/ext4/readpage.c | 1 -
fs/f2fs/checkpoint.c | 2 +-
fs/f2fs/compress.c | 2 +-
fs/f2fs/data.c | 2 +-
fs/f2fs/f2fs.h | 2 --
fs/f2fs/file.c | 1 -
fs/f2fs/node.c | 2 +-
fs/gfs2/aops.c | 2 +-
fs/hugetlbfs/inode.c | 2 +-
fs/mpage.c | 1 -
fs/netfs/buffered_write.c | 1 -
fs/nfs/blocklayout/blocklayout.c | 1 -
fs/nfs/dir.c | 1 -
fs/nilfs2/btree.c | 2 +-
fs/nilfs2/page.c | 2 +-
fs/nilfs2/segment.c | 2 +-
fs/ocfs2/refcounttree.c | 1 -
fs/ramfs/file-nommu.c | 2 +-
fs/smb/client/connect.c | 1 -
fs/smb/client/file.c | 1 -
include/linux/{pagevec.h => folio_batch.h} | 16 ++++++++--------
include/linux/folio_queue.h | 8 ++++----
include/linux/iomap.h | 2 +-
include/linux/sunrpc/svc.h | 2 +-
include/linux/swap.h | 2 --
include/linux/writeback.h | 2 +-
mm/filemap.c | 2 +-
mm/gup.c | 2 +-
mm/memcontrol.c | 2 +-
mm/mlock.c | 2 +-
mm/page-writeback.c | 2 +-
mm/page_alloc.c | 2 +-
mm/shmem.c | 6 +++---
mm/swap.c | 4 ++--
mm/swap_state.c | 4 ++--
mm/truncate.c | 8 ++++----
mm/vmscan.c | 2 +-
53 files changed, 56 insertions(+), 73 deletions(-)
---
base-commit: 957a3fab8811b455420128ea5f41c51fd23eb6c7
change-id: 20260225-pagevec_cleanup-d47c16cb0f2d
Best regards,
--
Tal Zussman <tz2294@columbia.edu>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/4] mm: Remove stray references to struct pagevec
2026-02-25 23:44 [PATCH v2 0/4] mm: Remove stray references to pagevec Tal Zussman
@ 2026-02-25 23:44 ` Tal Zussman
2026-02-25 23:44 ` [PATCH v2 2/4] fs: Remove unncessary pagevec.h includes Tal Zussman
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Tal Zussman @ 2026-02-25 23:44 UTC (permalink / raw)
To: David Howells, Marc Dionne, Jaegeuk Kim, Chao Yu, Andrew Morton,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
Barry Song, Matthew Wilcox, Dan Williams, Jan Kara,
Alexander Viro, Christian Brauner, Theodore Ts'o
Cc: Andreas Dilger, Paulo Alcantara, Trond Myklebust, Anna Schumaker,
Mark Fasheh, Joel Becker, Joseph Qi, Steve French,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, Chris Mason, David Sterba,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko,
Andreas Gruenbacher, Muchun Song, Oscar Salvador,
Ryusuke Konishi, Darrick J. Wong, Chuck Lever, Jeff Layton,
NeilBrown, Olga Kornievskaia, Dai Ngo, Jason Gunthorpe,
John Hubbard, Peter Xu, Johannes Weiner, Roman Gushchin,
Shakeel Butt, Jann Horn, Pedro Falcato, Brendan Jackman, Zi Yan,
Hugh Dickins, Baolin Wang, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Qi Zheng, linux-afs, linux-kernel, linux-f2fs-devel, linux-mm,
linux-fsdevel, nvdimm, linux-ext4, netfs, linux-nfs, ocfs2-devel,
linux-cifs, samba-technical, dri-devel, intel-gfx, linux-btrfs,
ceph-devel, gfs2, linux-nilfs, linux-xfs, cgroups, Tal Zussman
struct pagevec was removed in commit 1e0877d58b1e ("mm: remove struct
pagevec"). Remove remaining forward declarations and change
__folio_batch_release()'s declaration to match its definition.
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Chris Li <chrisl@kernel.org>
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
fs/afs/internal.h | 1 -
fs/f2fs/f2fs.h | 2 --
include/linux/pagevec.h | 2 +-
include/linux/swap.h | 2 --
4 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 009064b8d661..599353c33337 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -31,7 +31,6 @@
#define AFS_CELL_MAX_ADDRS 15
-struct pagevec;
struct afs_call;
struct afs_vnode;
struct afs_server_probe;
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index bb34e864d0ef..d9e8531a5301 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -28,8 +28,6 @@
#include <linux/fscrypt.h>
#include <linux/fsverity.h>
-struct pagevec;
-
#ifdef CONFIG_F2FS_CHECK_FS
#define f2fs_bug_on(sbi, condition) BUG_ON(condition)
#else
diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 63be5a451627..007affabf335 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -93,7 +93,7 @@ static inline struct folio *folio_batch_next(struct folio_batch *fbatch)
return fbatch->folios[fbatch->i++];
}
-void __folio_batch_release(struct folio_batch *pvec);
+void __folio_batch_release(struct folio_batch *fbatch);
static inline void folio_batch_release(struct folio_batch *fbatch)
{
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 0effe3cc50f5..4b1f13b5bbad 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -20,8 +20,6 @@ struct notifier_block;
struct bio;
-struct pagevec;
-
#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
#define SWAP_FLAG_PRIO_MASK 0x7fff
#define SWAP_FLAG_DISCARD 0x10000 /* enable discard for swap */
--
2.39.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] fs: Remove unncessary pagevec.h includes
2026-02-25 23:44 [PATCH v2 0/4] mm: Remove stray references to pagevec Tal Zussman
2026-02-25 23:44 ` [PATCH v2 1/4] mm: Remove stray references to struct pagevec Tal Zussman
@ 2026-02-25 23:44 ` Tal Zussman
2026-02-25 23:44 ` [PATCH v2 3/4] folio_batch: Rename pagevec.h to folio_batch.h Tal Zussman
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Tal Zussman @ 2026-02-25 23:44 UTC (permalink / raw)
To: David Howells, Marc Dionne, Jaegeuk Kim, Chao Yu, Andrew Morton,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
Barry Song, Matthew Wilcox, Dan Williams, Jan Kara,
Alexander Viro, Christian Brauner, Theodore Ts'o
Cc: Andreas Dilger, Paulo Alcantara, Trond Myklebust, Anna Schumaker,
Mark Fasheh, Joel Becker, Joseph Qi, Steve French,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, Chris Mason, David Sterba,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko,
Andreas Gruenbacher, Muchun Song, Oscar Salvador,
Ryusuke Konishi, Darrick J. Wong, Chuck Lever, Jeff Layton,
NeilBrown, Olga Kornievskaia, Dai Ngo, Jason Gunthorpe,
John Hubbard, Peter Xu, Johannes Weiner, Roman Gushchin,
Shakeel Butt, Jann Horn, Pedro Falcato, Brendan Jackman, Zi Yan,
Hugh Dickins, Baolin Wang, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Qi Zheng, linux-afs, linux-kernel, linux-f2fs-devel, linux-mm,
linux-fsdevel, nvdimm, linux-ext4, netfs, linux-nfs, ocfs2-devel,
linux-cifs, samba-technical, dri-devel, intel-gfx, linux-btrfs,
ceph-devel, gfs2, linux-nilfs, linux-xfs, cgroups, Tal Zussman
Remove unused pagevec.h includes from .c files. These were found with
the following command:
grep -rl '#include.*pagevec\.h' --include='*.c' | while read f; do
grep -qE 'PAGEVEC_SIZE|folio_batch' "$f" || echo "$f"
done
There are probably more removal candidates in .h files, but those are
more complex to analyze.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
fs/afs/write.c | 1 -
fs/dax.c | 1 -
fs/ext4/file.c | 1 -
fs/ext4/page-io.c | 1 -
fs/ext4/readpage.c | 1 -
fs/f2fs/file.c | 1 -
fs/mpage.c | 1 -
fs/netfs/buffered_write.c | 1 -
fs/nfs/blocklayout/blocklayout.c | 1 -
fs/nfs/dir.c | 1 -
fs/ocfs2/refcounttree.c | 1 -
fs/smb/client/connect.c | 1 -
fs/smb/client/file.c | 1 -
13 files changed, 13 deletions(-)
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 93ad86ff3345..fcfed9d24e0a 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -10,7 +10,6 @@
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
#include <linux/netfs.h>
#include <trace/events/netfs.h>
#include "internal.h"
diff --git a/fs/dax.c b/fs/dax.c
index b78cff9c91b3..a5237169b467 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -15,7 +15,6 @@
#include <linux/memcontrol.h>
#include <linux/mm.h>
#include <linux/mutex.h>
-#include <linux/pagevec.h>
#include <linux/sched.h>
#include <linux/sched/signal.h>
#include <linux/uio.h>
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index f1dc5ce791a7..5e02f6cf653e 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -27,7 +27,6 @@
#include <linux/dax.h>
#include <linux/filelock.h>
#include <linux/quotaops.h>
-#include <linux/pagevec.h>
#include <linux/uio.h>
#include <linux/mman.h>
#include <linux/backing-dev.h>
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index a8c95eee91b7..98da200d11c8 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -16,7 +16,6 @@
#include <linux/string.h>
#include <linux/buffer_head.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
#include <linux/mpage.h>
#include <linux/namei.h>
#include <linux/uio.h>
diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c
index 830f3b8a321f..3c7aabde719c 100644
--- a/fs/ext4/readpage.c
+++ b/fs/ext4/readpage.c
@@ -43,7 +43,6 @@
#include <linux/mpage.h>
#include <linux/writeback.h>
#include <linux/backing-dev.h>
-#include <linux/pagevec.h>
#include "ext4.h"
#include <trace/events/ext4.h>
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index c8a2f17a8f11..c6b6a1465d08 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -17,7 +17,6 @@
#include <linux/compat.h>
#include <linux/uaccess.h>
#include <linux/mount.h>
-#include <linux/pagevec.h>
#include <linux/uio.h>
#include <linux/uuid.h>
#include <linux/file.h>
diff --git a/fs/mpage.c b/fs/mpage.c
index 7dae5afc2b9e..e5285fbfcf09 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -28,7 +28,6 @@
#include <linux/mm_inline.h>
#include <linux/writeback.h>
#include <linux/backing-dev.h>
-#include <linux/pagevec.h>
#include "internal.h"
/*
diff --git a/fs/netfs/buffered_write.c b/fs/netfs/buffered_write.c
index 22a4d61631c9..05ea5b0cc0e8 100644
--- a/fs/netfs/buffered_write.c
+++ b/fs/netfs/buffered_write.c
@@ -10,7 +10,6 @@
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
-#include <linux/pagevec.h>
#include "internal.h"
static void __netfs_set_group(struct folio *folio, struct netfs_group *netfs_group)
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index cb0a645aeb50..11f9f69cde61 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -36,7 +36,6 @@
#include <linux/namei.h>
#include <linux/bio.h> /* struct bio */
#include <linux/prefetch.h>
-#include <linux/pagevec.h>
#include "../pnfs.h"
#include "../nfs4session.h"
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2402f57c8e7d..0d276441206b 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -32,7 +32,6 @@
#include <linux/nfs_fs.h>
#include <linux/nfs_mount.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/swap.h>
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index c1cdececdfa4..b4acd081bbc4 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -31,7 +31,6 @@
#include <linux/blkdev.h>
#include <linux/slab.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
#include <linux/swap.h>
#include <linux/security.h>
#include <linux/string.h>
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 33dfe116ca52..9e57812b7b95 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -20,7 +20,6 @@
#include <linux/delay.h>
#include <linux/completion.h>
#include <linux/kthread.h>
-#include <linux/pagevec.h>
#include <linux/freezer.h>
#include <linux/namei.h>
#include <linux/uuid.h>
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c
index 18f31d4eb98d..853ce1817810 100644
--- a/fs/smb/client/file.c
+++ b/fs/smb/client/file.c
@@ -15,7 +15,6 @@
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
#include <linux/writeback.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/delay.h>
--
2.39.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/4] folio_batch: Rename pagevec.h to folio_batch.h
2026-02-25 23:44 [PATCH v2 0/4] mm: Remove stray references to pagevec Tal Zussman
2026-02-25 23:44 ` [PATCH v2 1/4] mm: Remove stray references to struct pagevec Tal Zussman
2026-02-25 23:44 ` [PATCH v2 2/4] fs: Remove unncessary pagevec.h includes Tal Zussman
@ 2026-02-25 23:44 ` Tal Zussman
2026-02-25 23:44 ` [PATCH v2 4/4] folio_batch: Rename PAGEVEC_SIZE to FOLIO_BATCH_SIZE Tal Zussman
2026-02-26 0:41 ` [PATCH v2 0/4] mm: Remove stray references to pagevec Andrew Morton
4 siblings, 0 replies; 6+ messages in thread
From: Tal Zussman @ 2026-02-25 23:44 UTC (permalink / raw)
To: David Howells, Marc Dionne, Jaegeuk Kim, Chao Yu, Andrew Morton,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
Barry Song, Matthew Wilcox, Dan Williams, Jan Kara,
Alexander Viro, Christian Brauner, Theodore Ts'o
Cc: Andreas Dilger, Paulo Alcantara, Trond Myklebust, Anna Schumaker,
Mark Fasheh, Joel Becker, Joseph Qi, Steve French,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, Chris Mason, David Sterba,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko,
Andreas Gruenbacher, Muchun Song, Oscar Salvador,
Ryusuke Konishi, Darrick J. Wong, Chuck Lever, Jeff Layton,
NeilBrown, Olga Kornievskaia, Dai Ngo, Jason Gunthorpe,
John Hubbard, Peter Xu, Johannes Weiner, Roman Gushchin,
Shakeel Butt, Jann Horn, Pedro Falcato, Brendan Jackman, Zi Yan,
Hugh Dickins, Baolin Wang, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Qi Zheng, linux-afs, linux-kernel, linux-f2fs-devel, linux-mm,
linux-fsdevel, nvdimm, linux-ext4, netfs, linux-nfs, ocfs2-devel,
linux-cifs, samba-technical, dri-devel, intel-gfx, linux-btrfs,
ceph-devel, gfs2, linux-nilfs, linux-xfs, cgroups, Tal Zussman
struct pagevec was removed in commit 1e0877d58b1e ("mm: remove struct
pagevec"). Rename include/linux/pagevec.h to reflect reality and update
includes tree-wide. Add the new filename to MAINTAINERS explicitly, as
it no longer matches the "include/linux/page[-_]*" pattern in MEMORY
MANAGEMENT - CORE.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
MAINTAINERS | 1 +
drivers/gpu/drm/drm_gem.c | 2 +-
drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
drivers/gpu/drm/i915/gt/intel_gtt.h | 2 +-
drivers/gpu/drm/i915/i915_gpu_error.c | 2 +-
fs/btrfs/compression.c | 2 +-
fs/btrfs/extent_io.c | 2 +-
fs/btrfs/tests/extent-io-tests.c | 2 +-
fs/buffer.c | 2 +-
fs/ceph/addr.c | 2 +-
fs/ext4/inode.c | 2 +-
fs/f2fs/checkpoint.c | 2 +-
fs/f2fs/compress.c | 2 +-
fs/f2fs/data.c | 2 +-
fs/f2fs/node.c | 2 +-
fs/gfs2/aops.c | 2 +-
fs/hugetlbfs/inode.c | 2 +-
fs/nilfs2/btree.c | 2 +-
fs/nilfs2/page.c | 2 +-
fs/nilfs2/segment.c | 2 +-
fs/ramfs/file-nommu.c | 2 +-
include/linux/{pagevec.h => folio_batch.h} | 8 ++++----
include/linux/folio_queue.h | 2 +-
include/linux/iomap.h | 2 +-
include/linux/sunrpc/svc.h | 2 +-
include/linux/writeback.h | 2 +-
mm/filemap.c | 2 +-
mm/gup.c | 2 +-
mm/memcontrol.c | 2 +-
mm/mlock.c | 2 +-
mm/page-writeback.c | 2 +-
mm/page_alloc.c | 2 +-
mm/shmem.c | 2 +-
mm/swap.c | 2 +-
mm/swap_state.c | 2 +-
mm/truncate.c | 2 +-
mm/vmscan.c | 2 +-
37 files changed, 40 insertions(+), 39 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index e4572a36afd2..f50421e65cb1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16664,6 +16664,7 @@ L: linux-mm@kvack.org
S: Maintained
W: http://www.linux-mm.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
+F: include/linux/folio_batch.h
F: include/linux/gfp.h
F: include/linux/gfp_types.h
F: include/linux/highmem.h
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 891c3bff5ae0..dc4534fb175c 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -38,7 +38,7 @@
#include <linux/mman.h>
#include <linux/module.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/sched/mm.h>
#include <linux/shmem_fs.h>
#include <linux/slab.h>
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
index c6c64ba29bc4..07025b547c94 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
@@ -3,7 +3,7 @@
* Copyright © 2014-2016 Intel Corporation
*/
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/shmem_fs.h>
#include <linux/swap.h>
#include <linux/uio.h>
diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.h b/drivers/gpu/drm/i915/gt/intel_gtt.h
index 9d3a3ad567a0..b54ee4f25af1 100644
--- a/drivers/gpu/drm/i915/gt/intel_gtt.h
+++ b/drivers/gpu/drm/i915/gt/intel_gtt.h
@@ -19,7 +19,7 @@
#include <linux/io-mapping.h>
#include <linux/kref.h>
#include <linux/mm.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/scatterlist.h>
#include <linux/workqueue.h>
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index a99b4e45d26c..ffe5f24594c9 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -31,7 +31,7 @@
#include <linux/debugfs.h>
#include <linux/highmem.h>
#include <linux/nmi.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/scatterlist.h>
#include <linux/string_helpers.h>
#include <linux/utsname.h>
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 790518a8c803..dbc634d10ad3 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -8,7 +8,7 @@
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/highmem.h>
#include <linux/kthread.h>
#include <linux/time.h>
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 744a1fff6eef..c373d113f1e7 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -11,7 +11,7 @@
#include <linux/blkdev.h>
#include <linux/swap.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/prefetch.h>
#include <linux/fsverity.h>
#include "extent_io.h"
diff --git a/fs/btrfs/tests/extent-io-tests.c b/fs/btrfs/tests/extent-io-tests.c
index a0187d6163df..b2aacf846c8b 100644
--- a/fs/btrfs/tests/extent-io-tests.c
+++ b/fs/btrfs/tests/extent-io-tests.c
@@ -4,7 +4,7 @@
*/
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/sizes.h>
diff --git a/fs/buffer.c b/fs/buffer.c
index 22b43642ba57..f3122160ee2d 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -45,7 +45,7 @@
#include <linux/bitops.h>
#include <linux/mpage.h>
#include <linux/bit_spinlock.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/sched/mm.h>
#include <trace/events/block.h>
#include <linux/fscrypt.h>
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index e87b3bb94ee8..2803511d86ef 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -7,7 +7,7 @@
#include <linux/swap.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/signal.h>
#include <linux/iversion.h>
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 396dc3a5d16b..58f982885187 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -29,7 +29,7 @@
#include <linux/string.h>
#include <linux/buffer_head.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/mpage.h>
#include <linux/rmap.h>
#include <linux/namei.h>
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 6dd39b7de11a..0143365c07dc 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -11,7 +11,7 @@
#include <linux/writeback.h>
#include <linux/blkdev.h>
#include <linux/f2fs_fs.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/swap.h>
#include <linux/kthread.h>
#include <linux/delayacct.h>
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 8c76400ba631..614e00b8ffdc 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -13,7 +13,7 @@
#include <linux/lzo.h>
#include <linux/lz4.h>
#include <linux/zstd.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include "f2fs.h"
#include "node.h"
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 338df7a2aea6..90e8ef625d82 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -10,7 +10,7 @@
#include <linux/sched/mm.h>
#include <linux/mpage.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/blkdev.h>
#include <linux/bio.h>
#include <linux/blk-crypto.h>
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 74992fd9c9b6..ba0272314528 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -10,7 +10,7 @@
#include <linux/mpage.h>
#include <linux/sched/mm.h>
#include <linux/blkdev.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/swap.h>
#include "f2fs.h"
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index e79ad087512a..dae3dc4ee6f7 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -10,7 +10,7 @@
#include <linux/completion.h>
#include <linux/buffer_head.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/mpage.h>
#include <linux/fs.h>
#include <linux/writeback.h>
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 22c799000edb..2ec3e4231252 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -25,7 +25,7 @@
#include <linux/ctype.h>
#include <linux/backing-dev.h>
#include <linux/hugetlb.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/fs_parser.h>
#include <linux/mman.h>
#include <linux/slab.h>
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index dd0c8e560ef6..b400cfcdc803 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -10,7 +10,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/errno.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include "nilfs.h"
#include "page.h"
#include "btnode.h"
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c
index 56c4da417b6a..a9d8aa65416f 100644
--- a/fs/nilfs2/page.c
+++ b/fs/nilfs2/page.c
@@ -14,7 +14,7 @@
#include <linux/page-flags.h>
#include <linux/list.h>
#include <linux/highmem.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/gfp.h>
#include "nilfs.h"
#include "page.h"
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 098a3bd103e0..6d62de64a309 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -19,7 +19,7 @@
#include <linux/freezer.h>
#include <linux/kthread.h>
#include <linux/crc32.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/slab.h>
#include <linux/sched/signal.h>
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index 0f8e838ece07..2f79bcb89d2e 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -14,7 +14,7 @@
#include <linux/string.h>
#include <linux/backing-dev.h>
#include <linux/ramfs.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/mman.h>
#include <linux/sched.h>
#include <linux/slab.h>
diff --git a/include/linux/pagevec.h b/include/linux/folio_batch.h
similarity index 95%
rename from include/linux/pagevec.h
rename to include/linux/folio_batch.h
index 007affabf335..a2f3d3043f7e 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/folio_batch.h
@@ -1,13 +1,13 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
- * include/linux/pagevec.h
+ * include/linux/folio_batch.h
*
* In many places it is efficient to batch an operation up against multiple
* folios. A folio_batch is a container which is used for that.
*/
-#ifndef _LINUX_PAGEVEC_H
-#define _LINUX_PAGEVEC_H
+#ifndef _LINUX_FOLIO_BATCH_H
+#define _LINUX_FOLIO_BATCH_H
#include <linux/types.h>
@@ -102,4 +102,4 @@ static inline void folio_batch_release(struct folio_batch *fbatch)
}
void folio_batch_remove_exceptionals(struct folio_batch *fbatch);
-#endif /* _LINUX_PAGEVEC_H */
+#endif /* _LINUX_FOLIO_BATCH_H */
diff --git a/include/linux/folio_queue.h b/include/linux/folio_queue.h
index adab609c972e..0d3765fa9d1d 100644
--- a/include/linux/folio_queue.h
+++ b/include/linux/folio_queue.h
@@ -14,7 +14,7 @@
#ifndef _LINUX_FOLIO_QUEUE_H
#define _LINUX_FOLIO_QUEUE_H
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/mm.h>
/*
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 99b7209dabd7..4551613cea2f 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -9,7 +9,7 @@
#include <linux/types.h>
#include <linux/mm_types.h>
#include <linux/blkdev.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
struct address_space;
struct fiemap_extent_info;
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 4dc14c7a711b..a11acf5cd63b 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -20,7 +20,7 @@
#include <linux/lwq.h>
#include <linux/wait.h>
#include <linux/mm.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/kthread.h>
/*
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index e530112c4b3a..62552a2ce5b9 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -11,7 +11,7 @@
#include <linux/flex_proportions.h>
#include <linux/backing-dev-defs.h>
#include <linux/blk_types.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
struct bio;
diff --git a/mm/filemap.c b/mm/filemap.c
index 6cd7974d4ada..63f256307fdd 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -31,7 +31,7 @@
#include <linux/hash.h>
#include <linux/writeback.h>
#include <linux/backing-dev.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/security.h>
#include <linux/cpuset.h>
#include <linux/hugetlb.h>
diff --git a/mm/gup.c b/mm/gup.c
index 8e7dc2c6ee73..ad9ded39609c 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -18,7 +18,7 @@
#include <linux/hugetlb.h>
#include <linux/migrate.h>
#include <linux/mm_inline.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/sched/mm.h>
#include <linux/shmem_fs.h>
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index db59fad3503f..51508573963d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -34,7 +34,7 @@
#include <linux/shmem_fs.h>
#include <linux/hugetlb.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/vm_event_item.h>
#include <linux/smp.h>
#include <linux/page-flags.h>
diff --git a/mm/mlock.c b/mm/mlock.c
index 2f699c3497a5..1a92d16f3684 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -13,7 +13,7 @@
#include <linux/swap.h>
#include <linux/swapops.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/pagewalk.h>
#include <linux/mempolicy.h>
#include <linux/syscalls.h>
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 601a5e048d12..1009bb042ba4 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -33,7 +33,7 @@
#include <linux/sysctl.h>
#include <linux/cpu.h>
#include <linux/syscalls.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/timer.h>
#include <linux/sched/rt.h>
#include <linux/sched/signal.h>
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d88c8c67ac0b..74b603872f34 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -31,7 +31,7 @@
#include <linux/sysctl.h>
#include <linux/cpu.h>
#include <linux/cpuset.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/memory_hotplug.h>
#include <linux/nodemask.h>
#include <linux/vmstat.h>
diff --git a/mm/shmem.c b/mm/shmem.c
index cfed6c3ff853..149fdb051170 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -61,7 +61,7 @@ static struct vfsmount *shm_mnt __ro_after_init;
#include <linux/slab.h>
#include <linux/backing-dev.h>
#include <linux/writeback.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/percpu_counter.h>
#include <linux/falloc.h>
#include <linux/splice.h>
diff --git a/mm/swap.c b/mm/swap.c
index bb19ccbece46..2e517ede6561 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -20,7 +20,7 @@
#include <linux/swap.h>
#include <linux/mman.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/mm_inline.h>
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 32d9d877bda8..a0c64db2b275 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -15,7 +15,7 @@
#include <linux/leafops.h>
#include <linux/init.h>
#include <linux/pagemap.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/backing-dev.h>
#include <linux/blkdev.h>
#include <linux/migrate.h>
diff --git a/mm/truncate.c b/mm/truncate.c
index 12467c1bd711..df0b7a7e6aff 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -17,7 +17,7 @@
#include <linux/export.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/shmem_fs.h>
#include <linux/rmap.h>
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 7effd01a7828..7e921dbe2373 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -44,7 +44,7 @@
#include <linux/sysctl.h>
#include <linux/memory-tiers.h>
#include <linux/oom.h>
-#include <linux/pagevec.h>
+#include <linux/folio_batch.h>
#include <linux/prefetch.h>
#include <linux/printk.h>
#include <linux/dax.h>
--
2.39.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 4/4] folio_batch: Rename PAGEVEC_SIZE to FOLIO_BATCH_SIZE
2026-02-25 23:44 [PATCH v2 0/4] mm: Remove stray references to pagevec Tal Zussman
` (2 preceding siblings ...)
2026-02-25 23:44 ` [PATCH v2 3/4] folio_batch: Rename pagevec.h to folio_batch.h Tal Zussman
@ 2026-02-25 23:44 ` Tal Zussman
2026-02-26 0:41 ` [PATCH v2 0/4] mm: Remove stray references to pagevec Andrew Morton
4 siblings, 0 replies; 6+ messages in thread
From: Tal Zussman @ 2026-02-25 23:44 UTC (permalink / raw)
To: David Howells, Marc Dionne, Jaegeuk Kim, Chao Yu, Andrew Morton,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
Barry Song, Matthew Wilcox, Dan Williams, Jan Kara,
Alexander Viro, Christian Brauner, Theodore Ts'o
Cc: Andreas Dilger, Paulo Alcantara, Trond Myklebust, Anna Schumaker,
Mark Fasheh, Joel Becker, Joseph Qi, Steve French,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, Chris Mason, David Sterba,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko,
Andreas Gruenbacher, Muchun Song, Oscar Salvador,
Ryusuke Konishi, Darrick J. Wong, Chuck Lever, Jeff Layton,
NeilBrown, Olga Kornievskaia, Dai Ngo, Jason Gunthorpe,
John Hubbard, Peter Xu, Johannes Weiner, Roman Gushchin,
Shakeel Butt, Jann Horn, Pedro Falcato, Brendan Jackman, Zi Yan,
Hugh Dickins, Baolin Wang, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Qi Zheng, linux-afs, linux-kernel, linux-f2fs-devel, linux-mm,
linux-fsdevel, nvdimm, linux-ext4, netfs, linux-nfs, ocfs2-devel,
linux-cifs, samba-technical, dri-devel, intel-gfx, linux-btrfs,
ceph-devel, gfs2, linux-nilfs, linux-xfs, cgroups, Tal Zussman
struct pagevec no longer exists. Rename the macro appropriately.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
---
fs/btrfs/extent_io.c | 4 ++--
include/linux/folio_batch.h | 6 +++---
include/linux/folio_queue.h | 6 +++---
mm/shmem.c | 4 ++--
mm/swap.c | 2 +-
mm/swap_state.c | 2 +-
mm/truncate.c | 6 +++---
7 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index c373d113f1e7..d82ca509503f 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2095,13 +2095,13 @@ static void buffer_tree_tag_for_writeback(struct btrfs_fs_info *fs_info,
struct eb_batch {
unsigned int nr;
unsigned int cur;
- struct extent_buffer *ebs[PAGEVEC_SIZE];
+ struct extent_buffer *ebs[FOLIO_BATCH_SIZE];
};
static inline bool eb_batch_add(struct eb_batch *batch, struct extent_buffer *eb)
{
batch->ebs[batch->nr++] = eb;
- return (batch->nr < PAGEVEC_SIZE);
+ return (batch->nr < FOLIO_BATCH_SIZE);
}
static inline void eb_batch_init(struct eb_batch *batch)
diff --git a/include/linux/folio_batch.h b/include/linux/folio_batch.h
index a2f3d3043f7e..b45946adc50b 100644
--- a/include/linux/folio_batch.h
+++ b/include/linux/folio_batch.h
@@ -12,7 +12,7 @@
#include <linux/types.h>
/* 31 pointers + header align the folio_batch structure to a power of two */
-#define PAGEVEC_SIZE 31
+#define FOLIO_BATCH_SIZE 31
struct folio;
@@ -29,7 +29,7 @@ struct folio_batch {
unsigned char nr;
unsigned char i;
bool percpu_pvec_drained;
- struct folio *folios[PAGEVEC_SIZE];
+ struct folio *folios[FOLIO_BATCH_SIZE];
};
/**
@@ -58,7 +58,7 @@ static inline unsigned int folio_batch_count(const struct folio_batch *fbatch)
static inline unsigned int folio_batch_space(const struct folio_batch *fbatch)
{
- return PAGEVEC_SIZE - fbatch->nr;
+ return FOLIO_BATCH_SIZE - fbatch->nr;
}
/**
diff --git a/include/linux/folio_queue.h b/include/linux/folio_queue.h
index 0d3765fa9d1d..f6d5f1f127c9 100644
--- a/include/linux/folio_queue.h
+++ b/include/linux/folio_queue.h
@@ -29,12 +29,12 @@
*/
struct folio_queue {
struct folio_batch vec; /* Folios in the queue segment */
- u8 orders[PAGEVEC_SIZE]; /* Order of each folio */
+ u8 orders[FOLIO_BATCH_SIZE]; /* Order of each folio */
struct folio_queue *next; /* Next queue segment or NULL */
struct folio_queue *prev; /* Previous queue segment of NULL */
unsigned long marks; /* 1-bit mark per folio */
unsigned long marks2; /* Second 1-bit mark per folio */
-#if PAGEVEC_SIZE > BITS_PER_LONG
+#if FOLIO_BATCH_SIZE > BITS_PER_LONG
#error marks is not big enough
#endif
unsigned int rreq_id;
@@ -70,7 +70,7 @@ static inline void folioq_init(struct folio_queue *folioq, unsigned int rreq_id)
*/
static inline unsigned int folioq_nr_slots(const struct folio_queue *folioq)
{
- return PAGEVEC_SIZE;
+ return FOLIO_BATCH_SIZE;
}
/**
diff --git a/mm/shmem.c b/mm/shmem.c
index 149fdb051170..5e7dcf5bc5d3 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1113,7 +1113,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, uoff_t lend,
pgoff_t start = (lstart + PAGE_SIZE - 1) >> PAGE_SHIFT;
pgoff_t end = (lend + 1) >> PAGE_SHIFT;
struct folio_batch fbatch;
- pgoff_t indices[PAGEVEC_SIZE];
+ pgoff_t indices[FOLIO_BATCH_SIZE];
struct folio *folio;
bool same_folio;
long nr_swaps_freed = 0;
@@ -1510,7 +1510,7 @@ static int shmem_unuse_inode(struct inode *inode, unsigned int type)
struct address_space *mapping = inode->i_mapping;
pgoff_t start = 0;
struct folio_batch fbatch;
- pgoff_t indices[PAGEVEC_SIZE];
+ pgoff_t indices[FOLIO_BATCH_SIZE];
int ret = 0;
do {
diff --git a/mm/swap.c b/mm/swap.c
index 2e517ede6561..78b4aa811fc6 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -1018,7 +1018,7 @@ EXPORT_SYMBOL(folios_put_refs);
void release_pages(release_pages_arg arg, int nr)
{
struct folio_batch fbatch;
- int refs[PAGEVEC_SIZE];
+ int refs[FOLIO_BATCH_SIZE];
struct encoded_page **encoded = arg.encoded_pages;
int i;
diff --git a/mm/swap_state.c b/mm/swap_state.c
index a0c64db2b275..6313b59d7eab 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -385,7 +385,7 @@ void free_folio_and_swap_cache(struct folio *folio)
void free_pages_and_swap_cache(struct encoded_page **pages, int nr)
{
struct folio_batch folios;
- unsigned int refs[PAGEVEC_SIZE];
+ unsigned int refs[FOLIO_BATCH_SIZE];
folio_batch_init(&folios);
for (int i = 0; i < nr; i++) {
diff --git a/mm/truncate.c b/mm/truncate.c
index df0b7a7e6aff..2931d66c16d0 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -369,7 +369,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
pgoff_t start; /* inclusive */
pgoff_t end; /* exclusive */
struct folio_batch fbatch;
- pgoff_t indices[PAGEVEC_SIZE];
+ pgoff_t indices[FOLIO_BATCH_SIZE];
pgoff_t index;
int i;
struct folio *folio;
@@ -534,7 +534,7 @@ EXPORT_SYMBOL(truncate_inode_pages_final);
unsigned long mapping_try_invalidate(struct address_space *mapping,
pgoff_t start, pgoff_t end, unsigned long *nr_failed)
{
- pgoff_t indices[PAGEVEC_SIZE];
+ pgoff_t indices[FOLIO_BATCH_SIZE];
struct folio_batch fbatch;
pgoff_t index = start;
unsigned long ret;
@@ -672,7 +672,7 @@ int folio_unmap_invalidate(struct address_space *mapping, struct folio *folio,
int invalidate_inode_pages2_range(struct address_space *mapping,
pgoff_t start, pgoff_t end)
{
- pgoff_t indices[PAGEVEC_SIZE];
+ pgoff_t indices[FOLIO_BATCH_SIZE];
struct folio_batch fbatch;
pgoff_t index;
int i;
--
2.39.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 0/4] mm: Remove stray references to pagevec
2026-02-25 23:44 [PATCH v2 0/4] mm: Remove stray references to pagevec Tal Zussman
` (3 preceding siblings ...)
2026-02-25 23:44 ` [PATCH v2 4/4] folio_batch: Rename PAGEVEC_SIZE to FOLIO_BATCH_SIZE Tal Zussman
@ 2026-02-26 0:41 ` Andrew Morton
4 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2026-02-26 0:41 UTC (permalink / raw)
To: Tal Zussman
Cc: David Howells, Marc Dionne, Jaegeuk Kim, Chao Yu,
David Hildenbrand, Lorenzo Stoakes, Liam R. Howlett,
Vlastimil Babka, Mike Rapoport, Suren Baghdasaryan, Michal Hocko,
Chris Li, Kairui Song, Kemeng Shi, Nhat Pham, Baoquan He,
Barry Song, Matthew Wilcox, Dan Williams, Jan Kara,
Alexander Viro, Christian Brauner, Theodore Ts'o,
Andreas Dilger, Paulo Alcantara, Trond Myklebust, Anna Schumaker,
Mark Fasheh, Joel Becker, Joseph Qi, Steve French,
Ronnie Sahlberg, Shyam Prasad N, Tom Talpey, Bharath SM,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, Chris Mason, David Sterba,
Ilya Dryomov, Alex Markuze, Viacheslav Dubeyko,
Andreas Gruenbacher, Muchun Song, Oscar Salvador,
Ryusuke Konishi, Darrick J. Wong, Chuck Lever, Jeff Layton,
NeilBrown, Olga Kornievskaia, Dai Ngo, Jason Gunthorpe,
John Hubbard, Peter Xu, Johannes Weiner, Roman Gushchin,
Shakeel Butt, Jann Horn, Pedro Falcato, Brendan Jackman, Zi Yan,
Hugh Dickins, Baolin Wang, Axel Rasmussen, Yuanchu Xie, Wei Xu,
Qi Zheng, linux-afs, linux-kernel, linux-f2fs-devel, linux-mm,
linux-fsdevel, nvdimm, linux-ext4, netfs, linux-nfs, ocfs2-devel,
linux-cifs, samba-technical, dri-devel, intel-gfx, linux-btrfs,
ceph-devel, gfs2, linux-nilfs, linux-xfs, cgroups
On Wed, 25 Feb 2026 18:44:24 -0500 Tal Zussman <tz2294@columbia.edu> wrote:
> struct pagevec was removed in commit 1e0877d58b1e ("mm: remove struct
> pagevec"). Remove any stray references to it and rename relevant files
> and macros accordingly.
>
> While at it, remove unnecessary #includes of pagevec.h (now
> folio_batch.h) in .c files. There are probably more of these that could
> be removed in .h files, but those are more complex to verify.
Dang that's a lot of cc's ;)
Thanks, I'll add this series to mm.git's mm-new branch.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-02-26 0:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-25 23:44 [PATCH v2 0/4] mm: Remove stray references to pagevec Tal Zussman
2026-02-25 23:44 ` [PATCH v2 1/4] mm: Remove stray references to struct pagevec Tal Zussman
2026-02-25 23:44 ` [PATCH v2 2/4] fs: Remove unncessary pagevec.h includes Tal Zussman
2026-02-25 23:44 ` [PATCH v2 3/4] folio_batch: Rename pagevec.h to folio_batch.h Tal Zussman
2026-02-25 23:44 ` [PATCH v2 4/4] folio_batch: Rename PAGEVEC_SIZE to FOLIO_BATCH_SIZE Tal Zussman
2026-02-26 0:41 ` [PATCH v2 0/4] mm: Remove stray references to pagevec Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox