Re: [PATCH] mm/hugetlb: convert hugetlb_change_protection() to folios

From: Oscar Salvador
Date: Tue Jun 03 2025 - 01:28:46 EST


On Wed, May 28, 2025 at 03:20:13PM -0400, Sidhartha Kumar wrote:
> The for loop inside hugetlb_change_protection() increments by the huge
> page size:
>
> psize = huge_page_size(h);
> for (; address < end; address += psize)
>
> so we are operating on the head page of the huge pages between address
> and end. We can safely convert the struct page usage to struct folio.
>
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx>

Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>


--
Oscar Salvador
SUSE Labs