[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 5 May 2018 22:11:06 +0200
From: Mathieu Malaterre <malat@...ian.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mathieu Malaterre <malat@...ian.org>,
Michal Hocko <mhocko@...e.com>,
Vlastimil Babka <vbabka@...e.cz>,
Mel Gorman <mgorman@...hsingularity.net>,
Pavel Tatashin <pasha.tatashin@...cle.com>,
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
Joonsoo Kim <iamjoonsoo.kim@....com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] mm: move function ‘is_pageblock_removable_nolock’ inside blockers
Function ‘is_pageblock_removable_nolock’ is not used unless
CONFIG_MEMORY_HOTREMOVE is activated. Move it in between #ifdef sentinel to
match prototype in <linux/memory_hotplug.h>. Silence gcc warning (W=1):
mm/page_alloc.c:7704:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes]
Signed-off-by: Mathieu Malaterre <malat@...ian.org>
---
mm/page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 905db9d7962f..94ca579938e5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7701,6 +7701,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
return false;
}
+#ifdef CONFIG_MEMORY_HOTREMOVE
bool is_pageblock_removable_nolock(struct page *page)
{
struct zone *zone;
@@ -7723,6 +7724,7 @@ bool is_pageblock_removable_nolock(struct page *page)
return !has_unmovable_pages(zone, page, 0, MIGRATE_MOVABLE, true);
}
+#endif
#if (defined(CONFIG_MEMORY_ISOLATION) && defined(CONFIG_COMPACTION)) || defined(CONFIG_CMA)
--
2.11.0
Powered by blists - more mailing lists