summaryrefslogtreecommitdiff
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-13 00:12:21 +0300
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-06-29 15:51:06 +0300
commit9bc3e869386bdf5a00ecf71d6592050997e69d53 (patch)
tree737ef3f3616900c18cd45eec4babf5939fc84f06 /mm/filemap.c
parent0e8e08cca5e3256a6209f02b482bee96fb91ba1b (diff)
downloadlinux-9bc3e869386bdf5a00ecf71d6592050997e69d53.tar.xz
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>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 15399e8cd281..c821bc4a648b 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -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);