Re: [PATCH] mm/hugetlb: correct demote page offset logic

From: Oscar Salvador
Date: Thu Sep 15 2022 - 00:25:04 EST


On Wed, Sep 14, 2022 at 12:09:17PM -0700, Doug Berger wrote:
> With gigantic pages it may not be true that struct page structures
> are contiguous across the entire gigantic page. The nth_page macro
> is used here in place of direct pointer arithmetic to correct for
> this.
>
> Fixes: 8531fc6f52f5 ("hugetlb: add hugetlb demote page support")
> Signed-off-by: Doug Berger <opendmb@xxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>

Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>


--
Oscar Salvador
SUSE Labs