summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorKefeng Wang <wangkefeng.wang@huawei.com>2022-08-19 11:34:01 +0800
committerAndrew Morton <akpm@linux-foundation.org>2022-09-11 20:25:58 -0700
commit7adb45887c8af88985c335b53d253654e9d2dd16 (patch)
tree1d5b7bab688d2c973e6646ff63dd9aeb90b8772c /mm
parent33febb519d673b9f574903764f13f47e65328ca5 (diff)
mm: memory-failure: kill soft_offline_free_page()
Open-code the page_handle_poison() into soft_offline_page() and kill unneeded soft_offline_free_page(). Link: https://lkml.kernel.org/r/20220819033402.156519-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory-failure.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 8156ef0983a3..774b5234a715 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2511,16 +2511,6 @@ static int soft_offline_in_use_page(struct page *page)
return __soft_offline_page(page);
}
-static int soft_offline_free_page(struct page *page)
-{
- int rc = 0;
-
- if (!page_handle_poison(page, true, false))
- rc = -EBUSY;
-
- return rc;
-}
-
static void put_ref_page(struct page *page)
{
if (page)
@@ -2596,7 +2586,7 @@ retry:
if (ret > 0) {
ret = soft_offline_in_use_page(page);
} else if (ret == 0) {
- if (soft_offline_free_page(page) && try_again) {
+ if (!page_handle_poison(page, true, false) && try_again) {
try_again = false;
flags &= ~MF_COUNT_INCREASED;
goto retry;