mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-23 18:14:04 +08:00
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>
This commit is contained in:
parent
0b237047d5
commit
f8174a1181
@ -70,15 +70,8 @@ static void __read_end_io(struct bio *bio)
|
|||||||
{
|
{
|
||||||
struct folio_iter fi;
|
struct folio_iter fi;
|
||||||
|
|
||||||
bio_for_each_folio_all(fi, bio) {
|
bio_for_each_folio_all(fi, bio)
|
||||||
struct folio *folio = fi.folio;
|
folio_end_read(fi.folio, bio->bi_status == 0);
|
||||||
|
|
||||||
if (bio->bi_status)
|
|
||||||
folio_clear_uptodate(folio);
|
|
||||||
else
|
|
||||||
folio_mark_uptodate(folio);
|
|
||||||
folio_unlock(folio);
|
|
||||||
}
|
|
||||||
if (bio->bi_private)
|
if (bio->bi_private)
|
||||||
mempool_free(bio->bi_private, bio_post_read_ctx_pool);
|
mempool_free(bio->bi_private, bio_post_read_ctx_pool);
|
||||||
bio_put(bio);
|
bio_put(bio);
|
||||||
@ -336,8 +329,7 @@ int ext4_mpage_readpages(struct inode *inode,
|
|||||||
if (ext4_need_verity(inode, folio->index) &&
|
if (ext4_need_verity(inode, folio->index) &&
|
||||||
!fsverity_verify_folio(folio))
|
!fsverity_verify_folio(folio))
|
||||||
goto set_error_page;
|
goto set_error_page;
|
||||||
folio_mark_uptodate(folio);
|
folio_end_read(folio, true);
|
||||||
folio_unlock(folio);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (fully_mapped) {
|
} else if (fully_mapped) {
|
||||||
|
Loading…
Reference in New Issue
Block a user