diff options
author | Andi Kleen <ak@linux.intel.com> | 2010-09-27 03:00:12 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2010-10-08 03:32:46 -0400 |
commit | d5bd910696a27e505078c19ba6b4143537570681 (patch) | |
tree | a80f92016a158145315ba24999a05bb00bac6965 /mm/hugetlb.c | |
parent | 4e1c19750a8991c66e998a1915f2ad5c391bbd04 (diff) |
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>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7123270bfb38..67cd03239b75 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2946,6 +2946,8 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed) | |||
2946 | hugetlb_acct_memory(h, -(chg - freed)); | 2946 | hugetlb_acct_memory(h, -(chg - freed)); |
2947 | } | 2947 | } |
2948 | 2948 | ||
2949 | #ifdef CONFIG_MEMORY_FAILURE | ||
2950 | |||
2949 | /* Should be called in hugetlb_lock */ | 2951 | /* Should be called in hugetlb_lock */ |
2950 | static int is_hugepage_on_freelist(struct page *hpage) | 2952 | static int is_hugepage_on_freelist(struct page *hpage) |
2951 | { | 2953 | { |
@@ -2960,7 +2962,6 @@ static int is_hugepage_on_freelist(struct page *hpage) | |||
2960 | return 0; | 2962 | return 0; |
2961 | } | 2963 | } |
2962 | 2964 | ||
2963 | #ifdef CONFIG_MEMORY_FAILURE | ||
2964 | /* | 2965 | /* |
2965 | * This function is called from memory failure code. | 2966 | * This function is called from memory failure code. |
2966 | * Assume the caller holds page lock of the head page. | 2967 | * Assume the caller holds page lock of the head page. |