From: Miaohe Lin Date: Wed, 12 Jun 2024 07:18:33 +0000 (+0800) Subject: mm/memory-failure: fix comment of get_hwpoison_page() X-Git-Tag: v6.11-rc1~85^2~271 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b71340ef56a4cd5a5ed7f61a5c268ee346ff0640;p=thirdparty%2Fkernel%2Flinux.git mm/memory-failure: fix comment of get_hwpoison_page() When return value is 0, it could also means the page is free hugetlb page or free buddy page. Fix the corresponding comment. Link: https://lkml.kernel.org/r/20240612071835.157004-12-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Borislav Petkov (AMD) Cc: David Hildenbrand Cc: kernel test robot Cc: Naoya Horiguchi Cc: Tony Luck Signed-off-by: Andrew Morton --- diff --git a/mm/memory-failure.c b/mm/memory-failure.c index bb8e79381c1f6..475524f795501 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1525,7 +1525,7 @@ static int __get_unpoison_page(struct page *page) * the given page has PG_hwpoison. So it's never reused for other page * allocations, and __get_unpoison_page() never races with them. * - * Return: 0 on failure, + * Return: 0 on failure or free buddy (hugetlb) page, * 1 on success for in-use pages in a well-defined state, * -EIO for pages on which we can not handle memory errors, * -EBUSY when get_hwpoison_page() has raced with page lifecycle