From: Andrew Morton Date: Thu, 25 Oct 2012 01:14:50 +0000 (+1100) Subject: memory-hotplug-update-mce_bad_pages-when-removing-the-memory-fix X-Git-Tag: next-20121030~1^2~107 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b40597561e9325514afe2d80e0a17d365b2b5082;p=karo-tx-linux.git memory-hotplug-update-mce_bad_pages-when-removing-the-memory-fix cleanup ifdefs Cc: Benjamin Herrenschmidt Cc: Christoph Lameter Cc: Dave Hansen Cc: David Rientjes Cc: Jiang Liu Cc: KOSAKI Motohiro Cc: Len Brown Cc: Minchan Kim Cc: Paul Mackerras Cc: Wen Congyang Cc: Yasuaki Ishimatsu Cc: Mel Gorman Signed-off-by: Andrew Morton --- diff --git a/mm/sparse.c b/mm/sparse.c index 24072e435bf8..8152952e5014 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -788,6 +788,10 @@ static void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) } } } +#else +static inline void clear_hwpoisoned_pages(struct page *memmap, int nr_pages) +{ +} #endif void sparse_remove_one_section(struct zone *zone, struct mem_section *ms) @@ -803,10 +807,7 @@ void sparse_remove_one_section(struct zone *zone, struct mem_section *ms) ms->pageblock_flags = NULL; } -#ifdef CONFIG_MEMORY_FAILURE clear_hwpoisoned_pages(memmap, PAGES_PER_SECTION); -#endif - free_section_usemap(memmap, usemap); } #endif