From: Michal Hocko Date: Wed, 6 Sep 2017 23:20:27 +0000 (-0700) Subject: mm, memory_hotplug: remove explicit build_all_zonelists from try_online_node X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34ad1296571f7a004a761e3afc18e79428a726a8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm, memory_hotplug: remove explicit build_all_zonelists from try_online_node try_online_node calls hotadd_new_pgdat which already calls build_all_zonelists. So the additional call is redundant. Even though hotadd_new_pgdat will only initialize zonelists of the new node this is the right thing to do because such a node doesn't have any memory so other zonelists would ignore all the zones from this node anyway. Link: http://lkml.kernel.org/r/20170721143915.14161-6-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Toshi Kani Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Shaohua Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index c4df7d3c64d1..2f0c7ebc7624 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1081,13 +1081,6 @@ int try_online_node(int nid) node_set_online(nid); ret = register_one_node(nid); BUG_ON(ret); - - if (pgdat->node_zonelists->_zonerefs->zone == NULL) { - mutex_lock(&zonelists_mutex); - build_all_zonelists(NULL); - mutex_unlock(&zonelists_mutex); - } - out: mem_hotplug_done(); return ret;