This is a cleanup patch. In online_pages(), rename the local variable need_zonelists_rebuild to need_nodelists_rebuild. Signed-off-by: Pengfei Li <fly@xxxxxxxxxxx> --- mm/memory_hotplug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 3c63529df112..3ff55da7b225 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -760,10 +760,10 @@ struct zone * zone_for_pfn_range(int online_type, int nid, unsigned start_pfn, int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_type) { - unsigned long flags; + bool need_nodelists_rebuild = false; unsigned long onlined_pages = 0; + unsigned long flags; struct zone *zone; - int need_zonelists_rebuild = 0; int nid; int ret; struct memory_notify arg; @@ -798,7 +798,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ * So, zonelist must be updated after online. */ if (!populated_zone(zone)) { - need_zonelists_rebuild = 1; + need_nodelists_rebuild = true; setup_zone_pageset(zone); } @@ -806,7 +806,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ online_pages_range); if (ret) { /* not a single memory resource was applicable */ - if (need_zonelists_rebuild) + if (need_nodelists_rebuild) zone_pcp_reset(zone); goto failed_addition; } @@ -820,7 +820,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ shuffle_zone(zone); node_states_set_node(nid, &arg); - if (need_zonelists_rebuild) + if (need_nodelists_rebuild) build_all_nodelists(NULL); else zone_pcp_update(zone); -- 2.23.0