Skip to content

Commit c3454ac

Browse files
Matthew Wilcox (Oracle)Andreas Gruenbacher
authored andcommitted
gfs2: Use bio_add_folio_nofail()
As the label says, we've just allocated a new BIO so we know we can add this folio to it. We now have bio_add_folio_nofail() for this purpose. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent de90521 commit c3454ac

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/gfs2/lops.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,7 @@ int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head)
562562
bio = gfs2_log_alloc_bio(sdp, dblock, gfs2_end_log_read);
563563
bio->bi_opf = REQ_OP_READ;
564564
add_block_to_new_bio:
565-
if (!bio_add_folio(bio, folio, bsize, off))
566-
BUG();
565+
bio_add_folio_nofail(bio, folio, bsize, off);
567566
block_added:
568567
off += bsize;
569568
if (off == folio_size(folio))

0 commit comments

Comments
 (0)