Re: [PATCH v4 16/17] mm/huge_memory: count only swap cache refs in anon folio split
From: Kiryl Shutsemau
Date: Wed Sep 09 2026 - 04:35:47 EST
On Tue, Sep 08, 2026 at 02:12:20AM +0800, Kairui Song via B4 Relay wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> Only __folio_freeze_split_anon() sees anon folios and swap cache folios
> now. The file split helper only handles page cache folios, which hold
> exactly folio_nr_pages() references.
>
> Rename folio_cache_ref_count() to folio_swapcache_ref_count() and drop
> the anon check so the helper counts what its name says. The file split
> helper now uses folio_nr_pages() directly.
>
> No feature change.
>
> Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
> Reviewed-by: Yeoreum Yun <yeoreum.yun@xxxxxxx>
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
--
Kiryl Shutsemau / Kirill A. Shutemov