From: Naoya Horiguchi Date: Fri, 3 Jun 2022 02:10:43 +0000 (+0000) Subject: mm-hwpoison-hugetlb-introduce-subpage_index_hwpoison-to-save-raw-error-page-fix X-Git-Tag: maple_v12_fixes~148 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be919200722d2bd5ef63a94d7f2863119e7cf8d1;p=users%2Fjedix%2Flinux-maple.git 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 --- 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.