summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2023-10-04 19:53:06 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-10-19 00:34:16 +0300
commit7a4847e54cc1889d109ce2a6ebed19aafc4a4af8 (patch)
tree16c92b559618945f92a73544d37d8eb1702f0507
parent6ba924d341c24027d95352ae8802c9cd1c308559 (diff)
downloadlinux-7a4847e54cc1889d109ce2a6ebed19aafc4a4af8.tar.xz
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/20231004165317.1061855-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alexander Gordeev <agordeev@linux.ibm.com> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Richard Henderson <richard.henderson@linaro.org> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-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)