mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 17:18:25 +02:00
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>
This commit is contained in:
parent
9bc3e86938
commit
1dfa24a4bf
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue