Commit 1dfa24a4 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle)
Browse files

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: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
parent 9bc3e869
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3524,8 +3524,10 @@ static struct folio *do_read_cache_folio(struct address_space *mapping,
	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);
	}