Re: [PATCH v3 02/18] mm/huge_memory: fix rejection of swap cache folios with a mapping
From: Kiryl Shutsemau
Date: Thu Aug 27 2026 - 10:36:53 EST
On Fri, Aug 21, 2026 at 02:55:15AM +0800, Kairui Song via B4 Relay wrote:
> @@ -3886,11 +3889,11 @@ int folio_check_splittable(struct folio *folio, unsigned int new_order,
> * TODO: this will also currently refuse folios without a mapping in the
> * swapcache (shmem or to-be-anon folios).
> */
> - if (!folio->mapping && !folio_test_anon(folio))
> + if (!folio->mapping && !is_anon)
Just noticed, !folio->mapping is always !is_anon as folio_test_anon() is
encoded in folio->mapping.
> return -EBUSY;
>
> /* order-1 is not supported for anonymous THP. */
--
Kiryl Shutsemau / Kirill A. Shutemov