aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorMichal Hocko <mhocko@suse.com>2017-09-06 19:20:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-06 20:27:26 -0400
commit34ad1296571f7a004a761e3afc18e79428a726a8 (patch)
tree2f5053ba543bf0bfb48e8bfd72af1b2d199655c3 /mm
parent72675e131eb418c78980c1e683c0c25a25b61221 (diff)
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 <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Toshi Kani <toshi.kani@hpe.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory_hotplug.c7
1 files changed, 0 insertions, 7 deletions
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)
1081 node_set_online(nid); 1081 node_set_online(nid);
1082 ret = register_one_node(nid); 1082 ret = register_one_node(nid);
1083 BUG_ON(ret); 1083 BUG_ON(ret);
1084
1085 if (pgdat->node_zonelists->_zonerefs->zone == NULL) {
1086 mutex_lock(&zonelists_mutex);
1087 build_all_zonelists(NULL);
1088 mutex_unlock(&zonelists_mutex);
1089 }
1090
1091out: 1084out:
1092 mem_hotplug_done(); 1085 mem_hotplug_done();
1093 return ret; 1086 return ret;