mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-04 12:12:05 +00:00
mm/memory-failure: convert hugetlb_set_page_hwpoison() to folios
Change hugetlb_set_page_hwpoison() to folio_set_hugetlb_hwpoison() and use a folio internally. Link: https://lkml.kernel.org/r/20230112204608.80136-8-sidhartha.kumar@oracle.com Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
0858b5eb3a
commit
595dd8185c
@ -1721,13 +1721,12 @@ static unsigned long __folio_free_raw_hwp(struct folio *folio, bool move_flag)
|
||||
return count;
|
||||
}
|
||||
|
||||
static int hugetlb_set_page_hwpoison(struct page *hpage, struct page *page)
|
||||
static int folio_set_hugetlb_hwpoison(struct folio *folio, struct page *page)
|
||||
{
|
||||
struct llist_head *head;
|
||||
struct raw_hwp_page *raw_hwp;
|
||||
struct llist_node *t, *tnode;
|
||||
int ret = TestSetPageHWPoison(hpage) ? -EHWPOISON : 0;
|
||||
struct folio *folio = page_folio(hpage);
|
||||
int ret = folio_test_set_hwpoison(folio) ? -EHWPOISON : 0;
|
||||
|
||||
/*
|
||||
* Once the hwpoison hugepage has lost reliable raw error info,
|
||||
@ -1830,7 +1829,7 @@ int __get_huge_page_for_hwpoison(unsigned long pfn, int flags,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (hugetlb_set_page_hwpoison(&folio->page, page)) {
|
||||
if (folio_set_hugetlb_hwpoison(folio, page)) {
|
||||
ret = -EHWPOISON;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user