mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS
Subsystems (2)
PATCH 1/1 mm/hugetlb: replace get_hwpoison_huge_page() with get_hwpoison_hugetlb_folio() when !CONFIG_HUGETLBFS
From: Yang Yang <[email protected]>
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.
--- include/linux/hugetlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/hugetlb.h +2 -1
@@ -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 ; }
Signature · 1 line
2.25.1
Quoted 19 lines · On 1/19/23 6:36 PM, [email protected] wrote:
From: Yang Yang <[email protected]>
When
CONFIG_HUGETLBFSis not set, there are two problems. One is implicit declaration of functionget_hwpoison_hugetlb_folio(), the other isget_hwpoison_huge_page()is defined but not used. Fix them all by definingget_hwpoison_hugetlb_folio()instead ofget_hwpoison_huge_page()when !CONFIG_HUGETLB_PAGE.Fixes 92e109a2c5a7 ("mm/hugetlb: convert get_hwpoison_huge_page() to folios")Signed-off-by Yang Yang <[email protected]>--- include/linux/hugetlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)include/linux/hugetlb.h +0
-0
include/linux/hugetlb.h static inline int isolate_hugetlb(struct folio *folio, struct list_head *list) · line 424
Quoted 9 lines
include/linux/hugetlb.h +2
-1@@ -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/[email protected]/T/
which has been added to mm-unstable now.
Thanks,
Sidhartha Kumar