filemap: Move 'filler' case to the end of do_read_cache_folio()

No functionality change intended; this simply moves code around to
disentangle the function a little.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
parent 0e8e08cc
......@@ -3492,20 +3492,7 @@ static struct folio *do_read_cache_folio(struct address_space *mapping,
return ERR_PTR(err);
}
filler:
err = filler(file, folio);
if (err < 0) {
folio_put(folio);
return ERR_PTR(err);
}
folio_wait_locked(folio);
if (!folio_test_uptodate(folio)) {
folio_put(folio);
return ERR_PTR(-EIO);
}
goto out;
goto filler;
}
if (folio_test_uptodate(folio))
goto out;
......@@ -3535,7 +3522,18 @@ static struct folio *do_read_cache_folio(struct address_space *mapping,
* set again if read page fails.
*/
folio_clear_error(folio);
goto filler;
filler:
err = filler(file, folio);
if (err < 0) {
folio_put(folio);
return ERR_PTR(err);
}
folio_wait_locked(folio);
if (!folio_test_uptodate(folio)) {
folio_put(folio);
return ERR_PTR(-EIO);
}
out:
folio_mark_accessed(folio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment