]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm, hwpoison: avoid trying to unpoison reserved page
authorMiaohe Lin <linmiaohe@huawei.com>
Thu, 18 Aug 2022 13:00:16 +0000 (21:00 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 22 Aug 2022 22:58:16 +0000 (15:58 -0700)
commitce7a6349dd077fc55f601ce94546608c0338af74
treefc0c933f2f09cf4504bc7d633e24c94239407db9
parent18552c37d938f191849f9aface74e3e24fc63d53
mm, hwpoison: avoid trying to unpoison reserved page

For reserved pages, HWPoison flag will be set without increasing the page
refcnt.  So we shouldn't even try to unpoison these pages and thus
decrease the page refcnt unexpectly.  Add a PageReserved() check to filter
this case out and remove the below unneeded zero page (zero page is
reserved) check.

Link: https://lkml.kernel.org/r/20220818130016.45313-7-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/memory-failure.c