Re: [PATCH v4 1/6] mm/huge_memory: move unrelated code out of __split_unmapped_folio()

From: David Hildenbrand
Date: Fri Jul 18 2025 - 03:19:50 EST


On 18.07.25 04:29, Zi Yan wrote:
remap(), folio_ref_unfreeze(), lru_add_split_folio() are not relevant to
splitting unmapped folio operations. Move them out to __folio_split() so
that __split_unmapped_folio() only handles unmapped folio splits. This
makes __split_unmapped_folio() reusable.

Remove the swapcache folio split check code before __split_unmapped_folio()
call, since it is already checked at the beginning of __folio_split() in
uniform_split_supported() and non_uniform_split_supported().

Along with the code move, there are some variable renames:

1. release is renamed to new_folio,
2. origin_folio is now folio, since __folio_split() has folio pointing to
the original folio already.

Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
---

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb