Re: [PATCH 1/2] mm: vmscan: allow writeout of swapcache folios without anon mappings

From: Baolin Wang

Date: Tue Nov 10 2026 - 01:02:18 EST




On 11/7/26 12:04 AM, Nhat Pham wrote:
Unfaulted zswap readahead folios can be dirty and in swapcache without
an anonymous mapping. pageout() rejects them before swap_writeout(),
so reclaim cannot write them out while their swap entries remain
referenced.

Allow swapcache folios through the filesystem folio check. They already
have swap entries and can use the existing swap writeout path. Anonymous
folios outside swapcache have no mapping and already return PAGE_KEEP.

Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
Link: https://lore.kernel.org/all/sashiko-outbox-181078@xxxxxxxxxx/
Fixes: 84798514db50 ("mm: Remove swap_writepage() and shmem_writepage()")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Nhat Pham <nphamcs@xxxxxxxxx>
---

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>