From: Matthew Wilcox (Oracle) Date: Mon, 10 Feb 2025 13:34:46 +0000 (+0000) Subject: gfs2: Convert gfs2_meta_read_endio() to use a folio X-Git-Tag: v6.15-rc1~154^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0776a508d1d4480d23873ccbee336123c992ff6e;p=thirdparty%2Flinux.git 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) Signed-off-by: Andreas Gruenbacher --- diff --git a/fs/gfs2/meta_io.c b/fs/gfs2/meta_io.c index 66db506a5f7fd..198cc70566375 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;