[Drbd-dev] [RFC PATCH 12/37] zonefs: use bio_init_fields in append
Chaitanya Kulkarni
chaitanya.kulkarni at wdc.com
Tue Jan 19 06:06:06 CET 2021
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
fs/zonefs/super.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index bec47f2d074b..3117a89550f6 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -682,10 +682,9 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from)
if (!bio)
return -ENOMEM;
- bio_set_dev(bio, bdev);
- bio->bi_iter.bi_sector = zi->i_zsector;
- bio->bi_write_hint = iocb->ki_hint;
- bio->bi_ioprio = iocb->ki_ioprio;
+ bio_init_fields(bio, bdev, zi->i_zsector, NULL, NULL, iocb->ki_ioprio,
+ iocb->ki_hint);
+
bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE;
if (iocb->ki_flags & IOCB_DSYNC)
bio->bi_opf |= REQ_FUA;
--
2.22.1
More information about the drbd-dev
mailing list