mm: memory-failure: make put_ref_page() more useful
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 21 Oct 2022 08:46:09 +0000 (16:46 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 9 Nov 2022 01:37:20 +0000 (17:37 -0800)
commitb5f1fc98c62b6b75e9f7499e7519dc67684affd3
tree9392b184ee88edf277795e3ca14d06b5687db5fa
parentf39556bc2530c83a22bc11b73c7a46df9a340685
mm: memory-failure: make put_ref_page() more useful

Pass pfn/flags to put_ref_page(), then check MF_COUNT_INCREASED and drop
refcount to make the code look cleaner.

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