From: Brendan Jackman Date: Tue, 31 Mar 2026 10:52:13 +0000 (+0000) Subject: mm/page_alloc: cleanup flag vars in alloc_pages_bulk_noprof() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d05e1f6ac26263dc27cfb2796ef4e5e24e070f4;p=thirdparty%2Fkernel%2Flinux.git mm/page_alloc: cleanup flag vars in alloc_pages_bulk_noprof() These two variables are redundant, squash them to align alloc_pages_bulk_noprof() with the style used in alloc_frozen_pages_nolock_noprof(). Link: https://lore.kernel.org/20260331-b4-prepare_alloc_pages-flags-v1-1-ea2416def698@google.com Signed-off-by: Brendan Jackman Reviewed-by: Suren Baghdasaryan Reviewed-by: Vishal Moola Reviewed-by: Vlastimil Babka (SUSE) Reviewed-by: Anshuman Khandual Cc: Johannes Weiner Cc: Michal Hocko Cc: Zi Yan Signed-off-by: Andrew Morton --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a81ae5781036..baf41005f90e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5054,7 +5054,6 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid, struct per_cpu_pages *pcp; struct list_head *pcp_list; struct alloc_context ac; - gfp_t alloc_gfp; unsigned int alloc_flags = ALLOC_WMARK_LOW; int nr_populated = 0, nr_account = 0; @@ -5095,10 +5094,8 @@ unsigned long alloc_pages_bulk_noprof(gfp_t gfp, int preferred_nid, /* May set ALLOC_NOFRAGMENT, fragmentation will return 1 page. */ gfp &= gfp_allowed_mask; - alloc_gfp = gfp; - if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &alloc_gfp, &alloc_flags)) + if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &gfp, &alloc_flags)) goto out; - gfp = alloc_gfp; /* Find an allowed local zone that meets the low watermark. */ z = ac.preferred_zoneref;