]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
iomap: Use folio_end_read()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 19 Jul 2023 14:59:07 +0000 (10:59 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 4 Oct 2023 01:07:32 +0000 (21:07 -0400)
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

index 4a996c5327efdef42718fba0a27309ef0a4ab08a..5d19a2b47b6a6c058e356a51f1c1b1697b37c6ae 100644 (file)
@@ -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)