Patch "memory-failure: convert truncate_error_page() to use folio" has been added to the 6.1-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

    memory-failure: convert truncate_error_page() to use folio

to the 6.1-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:
     memory-failure-convert-truncate_error_page-to-use-fo.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 86430873bd38064e37a7298e400a5f663c4efa25
Author: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx>
Date:   Thu Nov 17 23:30:54 2022 -0800

    memory-failure: convert truncate_error_page() to use folio
    
    [ Upstream commit ac5efa782041670b63a05c36d92d02a80e50bb63 ]
    
    Replace try_to_release_page() with filemap_release_folio().  This change
    is in preparation for the removal of the try_to_release_page() wrapper.
    
    Link: https://lkml.kernel.org/r/20221118073055.55694-4-vishal.moola@xxxxxxxxx
    Signed-off-by: Vishal Moola (Oracle) <vishal.moola@xxxxxxxxx>
    Acked-by: Naoya Horiguchi <naoya.horiguchi@xxxxxxx>
    Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
    Cc: Theodore Ts'o <tytso@xxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Stable-dep-of: 1898efcdbed3 ("block: update the stable_writes flag in bdev_add")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index ebd717157c813..6355166a6bb28 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -827,12 +827,13 @@ static int truncate_error_page(struct page *p, unsigned long pfn,
 	int ret = MF_FAILED;
 
 	if (mapping->a_ops->error_remove_page) {
+		struct folio *folio = page_folio(p);
 		int err = mapping->a_ops->error_remove_page(mapping, p);
 
 		if (err != 0) {
 			pr_info("%#lx: Failed to punch page: %d\n", pfn, err);
-		} else if (page_has_private(p) &&
-			   !try_to_release_page(p, GFP_NOIO)) {
+		} else if (folio_has_private(folio) &&
+			   !filemap_release_folio(folio, GFP_NOIO)) {
 			pr_info("%#lx: failed to release buffers\n", pfn);
 		} else {
 			ret = MF_RECOVERED;




[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