Skip to content

Commit 0776a50

Browse files
Matthew Wilcox (Oracle)Andreas Gruenbacher
authored andcommitted
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>
1 parent 536da2a commit 0776a50

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

fs/gfs2/meta_io.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,14 @@ struct buffer_head *gfs2_meta_new(struct gfs2_glock *gl, u64 blkno)
198198

199199
static void gfs2_meta_read_endio(struct bio *bio)
200200
{
201-
struct bio_vec *bvec;
202-
struct bvec_iter_all iter_all;
201+
struct folio_iter fi;
203202

204-
bio_for_each_segment_all(bvec, bio, iter_all) {
205-
struct page *page = bvec->bv_page;
206-
struct buffer_head *bh = page_buffers(page);
207-
unsigned int len = bvec->bv_len;
203+
bio_for_each_folio_all(fi, bio) {
204+
struct folio *folio = fi.folio;
205+
struct buffer_head *bh = folio_buffers(folio);
206+
size_t len = fi.length;
208207

209-
while (bh_offset(bh) < bvec->bv_offset)
208+
while (bh_offset(bh) < fi.offset)
210209
bh = bh->b_this_page;
211210
do {
212211
struct buffer_head *next = bh->b_this_page;

0 commit comments

Comments
 (0)