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: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
Matthew Wilcox (Oracle) 2022-05-12 17:12:21 -04:00
parent 0e8e08cca5
commit 9bc3e86938
1 changed files with 13 additions and 15 deletions

View File

@ -3492,20 +3492,7 @@ repeat:
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 @@ filler:
* 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);