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

[RFC PATCH 12/37] zonefs: use bio_init_fields in append

From: Chaitanya Kulkarni <hidden>
Date: 2021-01-19 08:27:35
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), the rest, zonefs filesystem · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds, Damien Le Moal, Naohiro Aota

Signed-off-by: Chaitanya Kulkarni <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help