[Drbd-dev] [RFC PATCH 25/37] dm-zoned: use bio_init_fields
Chaitanya Kulkarni
chaitanya.kulkarni at wdc.com
Tue Jan 19 06:06:19 CET 2021
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
drivers/md/md.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index ca409428b4fc..b331c81f3a12 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1001,11 +1001,9 @@ void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
atomic_inc(&rdev->nr_pending);
- bio_set_dev(bio, rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev);
- bio->bi_iter.bi_sector = sector;
bio_add_page(bio, page, size, 0);
- bio->bi_private = rdev;
- bio->bi_end_io = super_written;
+ bio_init_fields(bio, rdev->meta_bdev ? rdev->meta_bdev : rdev->bdev,
+ sector, rdev, super_written, 0, 0);
if (test_bit(MD_FAILFAST_SUPPORTED, &mddev->flags) &&
test_bit(FailFast, &rdev->flags) &&
--
2.22.1
More information about the drbd-dev
mailing list