Re: [PATCH v3 02/18] mm/huge_memory: fix rejection of swap cache folios with a mapping

From: David Hildenbrand (Arm)

Date: Thu Aug 27 2026 - 12:02:57 EST


On 8/27/26 16:36, Kiryl Shutsemau wrote:
> 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.

Ack. folio_mapping() behaves differently in that sense. confusing :)

--
Cheers,

David