Thread (44 messages) 44 messages, 5 authors, 2021-01-21

Lifecycle

  1. Posted Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

[RFC PATCH 06/37] gfs2: use bio_init_fields in lops

From: Chaitanya Kulkarni <hidden>
Date: 2021-01-19 05:25:16
Also in: dm-devel, linux-bcache, linux-block, linux-btrfs, linux-fsdevel, linux-raid, linux-scsi, linux-xfs, lkml, target-devel
Subsystem: filesystems (vfs and infrastructure), gfs2 file system, the rest · Maintainers: Alexander Viro, Christian Brauner, Andreas Gruenbacher, Linus Torvalds

Signed-off-by: Chaitanya Kulkarni <redacted>
---
 fs/gfs2/lops.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c
index 3922b26264f5..9f8a9757b086 100644
--- a/fs/gfs2/lops.c
+++ b/fs/gfs2/lops.c
@@ -264,10 +264,8 @@ static struct bio *gfs2_log_alloc_bio(struct gfs2_sbd *sdp, u64 blkno,
 	struct super_block *sb = sdp->sd_vfs;
 	struct bio *bio = bio_alloc(GFP_NOIO, BIO_MAX_PAGES);
 
-	bio->bi_iter.bi_sector = blkno << sdp->sd_fsb2bb_shift;
-	bio_set_dev(bio, sb->s_bdev);
-	bio->bi_end_io = end_io;
-	bio->bi_private = sdp;
+	bio_init_fields(bio, sb->s_bdev, blkno << sdp->sd_fsb2bb_shift,
+			sdp, end_io, 0, 0);
 
 	return bio;
 }
-- 
2.22.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help