summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}