Re: [PATCH] mm/page_alloc: cleanup flag vars in alloc_pages_bulk_noprof()
From: Vishal Moola
Date: Wed Apr 01 2026 - 13:11:30 EST
On Tue, Mar 31, 2026 at 09:10:11AM -0700, Suren Baghdasaryan wrote:
> On Tue, Mar 31, 2026 at 3:52 AM Brendan Jackman <jackmanb@xxxxxxxxxx> wrote:
> >
> > These two variables are redundant, squash them to align
> > alloc_pages_bulk_noprof() with the style used in
> > alloc_frozen_pages_nolock_noprof().
>
> Indeed. I'm not sure why this was needed even in the original patch
> (387ba26fb1cb) that introduced this function. It carefully preserves
> the original gfp even though its value either gets overwritten later
> (prepare_alloc_pages succeeds) or is unused (prepare_alloc_pages
> fails)...
I did some digging and wasn't able to find any reason myself. It should
be fine without it.
Reviewed-by: Vishal Moola <vishal.moola@xxxxxxxxx>
> >
> > Signed-off-by: Brendan Jackman <jackmanb@xxxxxxxxxx>
>
> Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>