* [PATCH linux-next] mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS
@ 2023-01-20 2:36 yang.yang29
2023-01-20 5:56 ` Sidhartha Kumar
0 siblings, 1 reply; 2+ messages in thread
From: yang.yang29 @ 2023-01-20 2:36 UTC (permalink / raw)
To: mike.kravetz, muchun.song; +Cc: linux-mm, linux-kernel, sidhartha.kumar, akpm
From: Yang Yang <yang.yang29@zte.com.cn>
When CONFIG_HUGETLBFS is not set, there are two problems. One
is implicit declaration of function get_hwpoison_hugetlb_folio(),
the other is get_hwpoison_huge_page() is defined but not used.
Fix them all by defining get_hwpoison_hugetlb_folio() instead of
get_hwpoison_huge_page() when !CONFIG_HUGETLB_PAGE.
Fixes: 92e109a2c5a7 ("mm/hugetlb: convert get_hwpoison_huge_page() to folios")
Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
---
include/linux/hugetlb.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index f14a6bd2a6ed..9189cc359c64 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -417,7 +417,8 @@ static inline int isolate_hugetlb(struct folio *folio, struct list_head *list)
return -EBUSY;
}
-static inline int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison)
+static inline int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb,
+ bool unpoison)
{
return 0;
}
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next] mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS
2023-01-20 2:36 [PATCH linux-next] mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS yang.yang29
@ 2023-01-20 5:56 ` Sidhartha Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Sidhartha Kumar @ 2023-01-20 5:56 UTC (permalink / raw)
To: yang.yang29, mike.kravetz, muchun.song; +Cc: linux-mm, linux-kernel, akpm
On 1/19/23 6:36 PM, yang.yang29@zte.com.cn wrote:
> From: Yang Yang <yang.yang29@zte.com.cn>
>
> When CONFIG_HUGETLBFS is not set, there are two problems. One
> is implicit declaration of function get_hwpoison_hugetlb_folio(),
> the other is get_hwpoison_huge_page() is defined but not used.
> Fix them all by defining get_hwpoison_hugetlb_folio() instead of
> get_hwpoison_huge_page() when !CONFIG_HUGETLB_PAGE.
>
> Fixes: 92e109a2c5a7 ("mm/hugetlb: convert get_hwpoison_huge_page() to folios")
> Signed-off-by: Yang Yang <yang.yang29@zte.com.cn>
> ---
> include/linux/hugetlb.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index f14a6bd2a6ed..9189cc359c64 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -417,7 +417,8 @@ static inline int isolate_hugetlb(struct folio *folio, struct list_head *list)
> return -EBUSY;
> }
>
> -static inline int get_hwpoison_huge_page(struct page *page, bool *hugetlb, bool unpoison)
> +static inline int get_hwpoison_hugetlb_folio(struct folio *folio, bool *hugetlb,
> + bool unpoison)
> {
> return 0;
> }
I believe this issue has been fixed by this patch:
https://lore.kernel.org/linux-mm/20230119111920.635260-1-arnd@kernel.org/T/
which has been added to mm-unstable now.
Thanks,
Sidhartha Kumar
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-20 5:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 2:36 [PATCH linux-next] mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS yang.yang29
2023-01-20 5:56 ` Sidhartha Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox