mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
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>
This commit is contained in:
parent
33febb519d
commit
7adb45887c
@ -2511,16 +2511,6 @@ static int soft_offline_in_use_page(struct page *page)
|
|||||||
return __soft_offline_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)
|
static void put_ref_page(struct page *page)
|
||||||
{
|
{
|
||||||
if (page)
|
if (page)
|
||||||
@ -2596,7 +2586,7 @@ retry:
|
|||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
ret = soft_offline_in_use_page(page);
|
ret = soft_offline_in_use_page(page);
|
||||||
} else if (ret == 0) {
|
} else if (ret == 0) {
|
||||||
if (soft_offline_free_page(page) && try_again) {
|
if (!page_handle_poison(page, true, false) && try_again) {
|
||||||
try_again = false;
|
try_again = false;
|
||||||
flags &= ~MF_COUNT_INCREASED;
|
flags &= ~MF_COUNT_INCREASED;
|
||||||
goto retry;
|
goto retry;
|
||||||
|
Loading…
Reference in New Issue
Block a user