Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ext4: use folio_end_read()

folio_end_read() is the perfect fit for ext4.

Link: https://lkml.kernel.org/r/20231004165317.1061855-5-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>

authored by

Matthew Wilcox (Oracle) and committed by
Andrew Morton
f8174a11 0b237047

+3 -11
+3 -11
fs/ext4/readpage.c
··· 70 70 { 71 71 struct folio_iter fi; 72 72 73 - bio_for_each_folio_all(fi, bio) { 74 - struct folio *folio = fi.folio; 75 - 76 - if (bio->bi_status) 77 - folio_clear_uptodate(folio); 78 - else 79 - folio_mark_uptodate(folio); 80 - folio_unlock(folio); 81 - } 73 + bio_for_each_folio_all(fi, bio) 74 + folio_end_read(fi.folio, bio->bi_status == 0); 82 75 if (bio->bi_private) 83 76 mempool_free(bio->bi_private, bio_post_read_ctx_pool); 84 77 bio_put(bio); ··· 329 336 if (ext4_need_verity(inode, folio->index) && 330 337 !fsverity_verify_folio(folio)) 331 338 goto set_error_page; 332 - folio_mark_uptodate(folio); 333 - folio_unlock(folio); 339 + folio_end_read(folio, true); 334 340 continue; 335 341 } 336 342 } else if (fully_mapped) {