Re: [PATCH 2/2] mm/huge_memory: fold split_folio_to_list_to_order() into split_folio_to_order()

From: Lorenzo Stoakes (ARM)

Date: Thu Jul 16 2026 - 10:04:08 EST


On Thu, Jul 16, 2026 at 11:03:45AM +0100, Kiryl Shutsemau wrote:
> From: "Kiryl Shutsemau (Meta)" <kas@xxxxxxxxxx>
>
> split_folio_to_list_to_order() had no direct callers; its only user was
> split_folio_to_order(), which always passed a NULL list. Fold it into
> split_folio_to_order() and call split_huge_page_to_list_to_order()
> directly.
>
> No functional change.
>
> Signed-off-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>

LGTM, so:

Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>

> ---
> include/linux/huge_mm.h | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 6961db4d1591..1842b1e6862a 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -792,15 +792,9 @@ static inline bool is_pmd_order(unsigned int order)
> return order == HPAGE_PMD_ORDER;
> }
>
> -static inline int split_folio_to_list_to_order(struct folio *folio,
> - struct list_head *list, int new_order)
> -{
> - return split_huge_page_to_list_to_order(&folio->page, list, new_order);
> -}
> -
> static inline int split_folio_to_order(struct folio *folio, int new_order)
> {
> - return split_folio_to_list_to_order(folio, NULL, new_order);
> + return split_huge_page_to_list_to_order(&folio->page, NULL, new_order);
> }
>
> /**
> --
> 2.54.0
>

Cheers, Lorenzo