From: Matthew Wilcox (Oracle) Date: Wed, 4 Oct 2023 16:53:06 +0000 (+0100) Subject: iomap: use folio_end_read() X-Git-Tag: v6.7-rc1~90^2~158 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a4847e54cc1889d109ce2a6ebed19aafc4a4af8;p=thirdparty%2Fkernel%2Flinux.git 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) Cc: Albert Ou Cc: Alexander Gordeev Cc: Andreas Dilger Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Richard Henderson Cc: Sven Schnelle Cc: "Theodore Ts'o" Cc: Thomas Bogendoerfer Cc: Vasily Gorbik Signed-off-by: Andrew Morton --- diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 4a996c5327efd..5d19a2b47b6a6 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)