aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <[email protected]>2023-10-04 17:53:06 +0100
committerAndrew Morton <[email protected]>2023-10-18 14:34:16 -0700
commit7a4847e54cc1889d109ce2a6ebed19aafc4a4af8 (patch)
tree16c92b559618945f92a73544d37d8eb1702f0507
parent6ba924d341c24027d95352ae8802c9cd1c308559 (diff)
iomap: use folio_end_read()
Combine the setting of the uptodate flag with the clearing of the locked flag. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Cc: Albert Ou <[email protected]> Cc: Alexander Gordeev <[email protected]> Cc: Andreas Dilger <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Matt Turner <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Sven Schnelle <[email protected]> Cc: "Theodore Ts'o" <[email protected]> Cc: Thomas Bogendoerfer <[email protected]> Cc: Vasily Gorbik <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--fs/iomap/buffered-io.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 4a996c5327ef..5d19a2b47b6a 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -270,10 +270,8 @@ static void iomap_finish_folio_read(struct folio *folio, size_t off,
if (error)
folio_set_error(folio);
- if (uptodate)
- folio_mark_uptodate(folio);
if (finished)
- folio_unlock(folio);
+ folio_end_read(folio, uptodate);
}
static void iomap_read_end_io(struct bio *bio)