Re: [PATCH 4/4] mm/page_alloc: remove set_page_private() in prep_compound_tail()

From: David Hildenbrand (Arm)

Date: Wed Jul 01 2026 - 04:58:37 EST


On 6/29/26 04:56, Zi Yan wrote:
> With the subpage->private == 0 check added in a prior commit, any allocated
> compound page should not have nonzero subpage->private. Remove the
> unnecessary subpage->private initialization code in compound page
> preparation.
>
> Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
> ---
> mm/internal.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/mm/internal.h b/mm/internal.h
> index 181e79f1d6a2..c96421ce9350 100644
> --- a/mm/internal.h
> +++ b/mm/internal.h
> @@ -895,7 +895,6 @@ static inline void prep_compound_tail(struct page *tail,
> {
> tail->mapping = TAIL_MAPPING;
> set_compound_head(tail, head, order);
> - set_page_private(tail, 0);

Do we want another safety check, maybe another VM_WARN_ON_ONCE?

--
Cheers,

David