projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64ab319
)
memory-failure: convert truncate_error_page() to use folio
author
Vishal Moola (Oracle)
<vishal.moola@gmail.com>
Fri, 18 Nov 2022 07:30:54 +0000
(23:30 -0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Wed, 30 Nov 2022 23:59:02 +0000
(15:59 -0800)
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>
mm/memory-failure.c
patch
|
blob
|
history
diff --git
a/mm/memory-failure.c
b/mm/memory-failure.c
index 63d8501001c6fe87e7c7b618c2ea087e8bb2800c..2e62940c7baee2a240a487bcb95ec5e9f8502c2c 100644
(file)
--- a/
mm/memory-failure.c
+++ b/
mm/memory-failure.c
@@
-840,12
+840,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;