From bdfbc40568cec6cafa8fcbe3f019a5261b92252d Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 23 Oct 2012 13:50:13 +1100 Subject: [PATCH] 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 --- mm/sparse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 -- 2.39.5