summaryrefslogtreecommitdiff
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-12 17:47:06 -0400
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-29 08:51:06 -0400
commit1dfa24a4bf3b00325d3957019e3ada2ec21d82cf (patch)
treeec8781971c4de203d0d0050d92c8775da4d991bf /mm/filemap.c
parent9bc3e869386bdf5a00ecf71d6592050997e69d53 (diff)
filemap: Handle AOP_TRUNCATED_PAGE in do_read_cache_folio()
If the call to filler() returns AOP_TRUNCATED_PAGE, we need to retry the page cache lookup. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index c821bc4a648b..4e2601bfff50 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -3524,8 +3524,10 @@ repeat:
folio_clear_error(folio);
filler:
err = filler(file, folio);
- if (err < 0) {
+ if (err) {
folio_put(folio);
+ if (err == AOP_TRUNCATED_PAGE)
+ goto repeat;
return ERR_PTR(err);
}