]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vmscan, cleanup: add for_each_managed_zone_pgdat macro
authorBertrand Wlodarczyk <bertrand.wlodarczyk@intel.com>
Mon, 10 Feb 2025 16:07:49 +0000 (17:07 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 4 Mar 2025 05:49:46 +0000 (21:49 -0800)
commit88e14d6987fdbaff6e528fd9dfff879718e1d9cb
tree0712f872fdffc160a07d5a09e44bbcf23ebc2dd3
parent34757bd64cef30f0ff7cdd96e907c9724eb563a9
vmscan, cleanup: add for_each_managed_zone_pgdat macro

The macro is introduced to eliminate redundancy in the repeated iteration
over managed zones in pgdat data structure, reducing the potential for
errors. This change doesn't introduce any functional modifications.
Due to concentration of the pattern in vmscan.c the macro is placed
locally in that file.

Link: https://lkml.kernel.org/r/20250210160818.686-1-bertrand.wlodarczyk@intel.com
Signed-off-by: Bertrand Wlodarczyk <bertrand.wlodarczyk@intel.com>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/vmscan.c