]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gfs2: Convert gfs2_meta_read_endio() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 10 Feb 2025 13:34:46 +0000 (13:34 +0000)
committerAndreas Gruenbacher <agruenba@redhat.com>
Mon, 10 Mar 2025 17:15:39 +0000 (18:15 +0100)
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>
fs/gfs2/meta_io.c

index 66db506a5f7fd59d076c1b1be33a36f4050342bc..198cc70566375565fff82326c886e75f29efdc9f 100644 (file)
@@ -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;