diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-02-10 13:34:46 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2025-03-10 18:15:39 +0100 |
commit | 0776a508d1d4480d23873ccbee336123c992ff6e (patch) | |
tree | 7b5e54ba37dba651aedab28cfb05cf298c1db4c1 | |
parent | 536da2a440b58d4f9aed963364a2921a41bec03d (diff) |
gfs2: Convert gfs2_meta_read_endio() to use a folio
Switch from bio_for_each_segment_all() to bio_for_each_folio_all()
which removes a call to page_buffers().
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
-rw-r--r-- | fs/gfs2/meta_io.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 66db506a5f7f..198cc7056637 100644 --- a/fs/gfs2/meta_io.c +++ b/fs/gfs2/meta_io.c @@ -198,15 +198,14 @@ struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno) static void gfs2_meta_read_endio(struct bio *bio) { - struct bio_vec *bvec; - struct bvec_iter_all iter_all; + struct folio_iter fi; - bio_for_each_segment_all(bvec, bio, iter_all) { - struct page *page = bvec->bv_page; - struct buffer_head *bh = page_buffers(page); - unsigned int len = bvec->bv_len; + bio_for_each_folio_all(fi, bio) { + struct folio *folio = fi.folio; + struct buffer_head *bh = folio_buffers(folio); + size_t len = fi.length; - while (bh_offset(bh) < bvec->bv_offset) + while (bh_offset(bh) < fi.offset) bh = bh->b_this_page; do { struct buffer_head *next = bh->b_this_page; |