From: Michal Hocko Date: Fri, 9 Nov 2012 03:04:03 +0000 (+1100) Subject: mm: make zone_pcp_reset independent of MEMORY_HOTREMOVE X-Git-Tag: next-20121112~5^2~241 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ca2fe9b5325c37002ed77e1e4ef85b1a43ea16a8;p=karo-tx-linux.git mm: make zone_pcp_reset independent of MEMORY_HOTREMOVE 340175b7 (mm/hotplug: free zone->pageset when a zone becomes empty) introduced zone_pcp_reset and hided it inside CONFIG_MEMORY_HOTREMOVE. Since "memory-hotplug: allocate zone's pcp before onlining pages" the function is also called from online_pages which is defined outside CONFIG_MEMORY_HOTREMOVE which causes a linkage error. The function, although not used outside of MEMORY_{HOTPLUT,HOTREMOVE}, seems like universal enough so let's keep it at its current location and only remove the HOTREMOVE guard. Signed-off-by: Michal Hocko Reviewed-by: Wen Congyang Cc: David Rientjes Signed-off-by: Andrew Morton --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fb1f9311f1fd..4da5e6289bf1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5981,7 +5981,6 @@ void __meminit zone_pcp_update(struct zone *zone) } #endif -#ifdef CONFIG_MEMORY_HOTREMOVE void zone_pcp_reset(struct zone *zone) { unsigned long flags; @@ -6001,6 +6000,7 @@ void zone_pcp_reset(struct zone *zone) local_irq_restore(flags); } +#ifdef CONFIG_MEMORY_HOTREMOVE /* * All pages in the range must be isolated before calling this. */