diff mbox series

[v2,06/17] iomap: Use folio_end_read()

Message ID 20231004165317.1061855-7-willy@infradead.org (mailing list archive)
State New
Headers show
Series Add folio_end_read | expand

Commit Message

Matthew Wilcox Oct. 4, 2023, 4:53 p.m. UTC
Combine the setting of the uptodate flag with the clearing of the
locked flag.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/iomap/buffered-io.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

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)