Re: [PATCH 5/6] hugetlb: make hugetlb_add_to_page_cache() use PAGE_SIZE-based index
From: Oscar Salvador
Date: Tue Apr 14 2026 - 06:33:18 EST
On Thu, Apr 09, 2026 at 05:41:56PM -0600, Jane Chu wrote:
> hugetlb_add_to_page_cache() currently takes a parameter named 'idx',
> but internally converts it from hugetlb page units into PAGE_SIZE-based
> page-cache index units before calling __filemap_add_folio().
>
> Make hugetlb_add_to_page_cache() take a PAGE_SIZE-based index directly
> and update its callers accordingly. This removes the internal shift,
> keeps the index units consistent with filemap_lock_folio() and
> __filemap_add_folio(), and simplifies the surrounding code.
>
> Signed-off-by: Jane Chu <jane.chu@xxxxxxxxxx>
Acked-by: Oscar Salvador <osalvador@xxxxxxx>
--
Oscar Salvador
SUSE Labs