From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
linux-mm@kvack.org
Subject: [PATCH 3/6] mm: Use mapping_evict_folio() in truncate_error_page()
Date: Wed, 8 Nov 2023 18:28:06 +0000 [thread overview]
Message-ID: <20231108182809.602073-4-willy@infradead.org> (raw)
In-Reply-To: <20231108182809.602073-1-willy@infradead.org>
We already have the folio and the mapping, so replace the call to
invalidate_inode_page() with mapping_evict_folio().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
mm/memory-failure.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 660c21859118..9f03952e6d38 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -930,10 +930,10 @@ static int delete_from_lru_cache(struct page *p)
static int truncate_error_page(struct page *p, unsigned long pfn,
struct address_space *mapping)
{
+ struct folio *folio = page_folio(p);
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)
@@ -947,7 +947,7 @@ static int truncate_error_page(struct page *p, unsigned long pfn,
* If the file system doesn't support it just invalidate
* This fails on dirty or anything with private pages
*/
- if (invalidate_inode_page(p))
+ if (mapping_evict_folio(mapping, folio))
ret = MF_RECOVERED;
else
pr_info("%#lx: Failed to invalidate\n", pfn);
--
2.42.0
next prev parent reply other threads:[~2023-11-08 18:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 18:28 [PATCH 0/6] Fix fault handler's handling of poisoned tail pages Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 1/6] mm: Make mapping_evict_folio() the preferred way to evict clean folios Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 2/6] mm: Convert __do_fault() to use a folio Matthew Wilcox (Oracle)
2023-11-08 21:07 ` Andrew Morton
2023-11-08 21:48 ` Matthew Wilcox
2023-11-08 18:28 ` Matthew Wilcox (Oracle) [this message]
2023-11-08 18:28 ` [PATCH 4/6] mm: Convert soft_offline_in_use_page() " Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 5/6] mm: Convert isolate_page() to mf_isolate_folio() Matthew Wilcox (Oracle)
2023-11-08 18:28 ` [PATCH 6/6] mm: Remove invalidate_inode_page() Matthew Wilcox (Oracle)
2023-11-08 21:10 ` [PATCH 0/6] Fix fault handler's handling of poisoned tail pages Andrew Morton
2023-11-08 21:49 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231108182809.602073-4-willy@infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox