From be919200722d2bd5ef63a94d7f2863119e7cf8d1 Mon Sep 17 00:00:00 2001 From: Naoya Horiguchi Date: Fri, 3 Jun 2022 02:10:43 +0000 Subject: [PATCH] mm-hwpoison-hugetlb-introduce-subpage_index_hwpoison-to-save-raw-error-page-fix build fix __get_huge_page_for_hwpoison() is not needed when CONFIG_HUGETLB_PAGE is n, so extending "#ifdef CONFIG_HUGETLB_PAG" to cover __get_huge_page_for_hwpoison() would be a simple resolution. Reported-by: kernel test robot Reported-by: Randy Dunlap Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton --- mm/memory-failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 1154c3da5c7e..73458f6723f9 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1498,6 +1498,7 @@ static int try_to_split_thp_page(struct page *page, const char *msg) return 0; } +#ifdef CONFIG_HUGETLB_PAGE /* * Called from hugetlb code with hugetlb_lock held. * @@ -1546,7 +1547,6 @@ out: return ret; } -#ifdef CONFIG_HUGETLB_PAGE /* * Taking refcount of hugetlb pages needs extra care about race conditions * with basic operations like hugepage allocation/free/demotion. -- 2.50.1