From d5bd910696a27e505078c19ba6b4143537570681 Mon Sep 17 00:00:00 2001 From: Andi Kleen <ak@linux.intel.com> Date: Mon, 27 Sep 2010 09:00:12 +0200 Subject: hugepage: move is_hugepage_on_freelist inside ifdef to avoid warning Fixes warning reported by Stephen Rothwell mm/hugetlb.c:2950: warning: 'is_hugepage_on_freelist' defined but not used for the !CONFIG_MEMORY_FAILURE case. Signed-off-by: Andi Kleen <ak@linux.intel.com> --- mm/hugetlb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mm') diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7123270bfb3..67cd03239b7 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2946,6 +2946,8 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed) hugetlb_acct_memory(h, -(chg - freed)); } +#ifdef CONFIG_MEMORY_FAILURE + /* Should be called in hugetlb_lock */ static int is_hugepage_on_freelist(struct page *hpage) { @@ -2960,7 +2962,6 @@ static int is_hugepage_on_freelist(struct page *hpage) return 0; } -#ifdef CONFIG_MEMORY_FAILURE /* * This function is called from memory failure code. * Assume the caller holds page lock of the head page. -- cgit v1.2.3-70-g09d2