diff options
author | Vishal Moola (Oracle) <vishal.moola@gmail.com> | 2022-11-17 23:30:54 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-10 17:10:31 +0100 |
commit | 8b6b3ecf0c1391ced217def3798546ed2c37fd7b (patch) | |
tree | 0e851ce40ada66993eb548666b401061b21129eb | |
parent | a6f440f3b9569dd3aca7faaddb08678bcff12847 (diff) | |
download | linux-stable-8b6b3ecf0c1391ced217def3798546ed2c37fd7b.tar.gz linux-stable-8b6b3ecf0c1391ced217def3798546ed2c37fd7b.tar.bz2 linux-stable-8b6b3ecf0c1391ced217def3798546ed2c37fd7b.zip |
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@gmail.com
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: 1898efcdbed3 ("block: update the stable_writes flag in bdev_add")
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | mm/memory-failure.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ebd717157c81..6355166a6bb2 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; |