From: Andrew Morton Date: Tue, 23 Oct 2012 02:50:13 +0000 (+1100) Subject: memory-hotplug-update-mce_bad_pages-when-removing-the-memory-fix X-Git-Tag: next-20121023~6^2~105 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=873f219faa57c7002ef83a75111372272bc28d98;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