Patch "mm: memory-failure: kill soft_offline_free_page()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mm: memory-failure: kill soft_offline_free_page()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-memory-failure-kill-soft_offline_free_page.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 36049f63cd1e7c8ed6840dce15ae3473718ac818
Author: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
Date:   Fri Aug 19 11:34:01 2022 +0800

    mm: memory-failure: kill soft_offline_free_page()
    
    [ Upstream commit 7adb45887c8af88985c335b53d253654e9d2dd16 ]
    
    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@xxxxxxxxxx
    Signed-off-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
    Reviewed-by: Miaohe Lin <linmiaohe@xxxxxxxxxx>
    Acked-by: Naoya Horiguchi <naoya.horiguchi@xxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: e2c1ab070fdc ("mm: memory-failure: fix unexpected return value in soft_offline_page()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 9f9dd968fbe3c..69d22af10adfc 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2219,16 +2219,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)
@@ -2294,7 +2284,7 @@ int soft_offline_page(unsigned long pfn, int flags)
 	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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux