[PATCH v2 0/3] mm: fix swapcache writeout and cluster table races

From: Nhat Pham

Date: Tue Nov 10 2026 - 12:44:15 EST


Reviews of vswap and v1 of this series found bugs in existing swap code.
Allow swapcache writeout without anon mappings, publish cluster tables
with the allocator locks held, and leave tableless clusters to the
allocator.

Changes in v2:
- Rebase onto the current mm-unstable tree.
- Use Suggested-by for Kairui in patch 2, as he requested.
- Add patch 3 to prevent stale tableless-cluster relocation, addressing
both scenarios in Sashiko's review.

v1: https://lore.kernel.org/all/20261106160432.2552507-1-nphamcs@xxxxxxxxx/

Nhat Pham (3):
mm: vmscan: allow writeout of swapcache folios without anon mappings
mm/swap: publish cluster tables after reacquiring allocator locks
mm/swap: skip relocation of tableless clusters

mm/swapfile.c | 113 ++++++++++++++++++++++++++++++++++++--------------
mm/vmscan.c | 3 +-
2 files changed, 83 insertions(+), 33 deletions(-)


base-commit: b024a51b0184b1efb6f55b11aaf7b15a490a6307
--
2.53.0-Meta