Thread (47 messages) 47 messages, 7 authors, 2021-01-21
STALE1990d

[RFC PATCH 32/37] eros: use bio_init_fields in zdata

From: Chaitanya Kulkarni <hidden>
Date: 2021-01-19 07:05:08
Also in: dm-devel, linux-bcache, linux-btrfs, linux-ext4, linux-fsdevel, linux-raid, linux-scsi, linux-xfs, lkml, target-devel
Subsystem: erofs file system, filesystems (vfs and infrastructure), the rest · Maintainers: Gao Xiang, Chao Yu, Alexander Viro, Christian Brauner, Linus Torvalds

Signed-off-by: Chaitanya Kulkarni <redacted>
---
 fs/erofs/zdata.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 6cb356c4217b..f7cdae88982a 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1236,12 +1236,9 @@ static void z_erofs_submit_queue(struct super_block *sb,
 
 			if (!bio) {
 				bio = bio_alloc(GFP_NOIO, BIO_MAX_PAGES);
-
-				bio->bi_end_io = z_erofs_decompressqueue_endio;
-				bio_set_dev(bio, sb->s_bdev);
-				bio->bi_iter.bi_sector = (sector_t)cur <<
-					LOG_SECTORS_PER_BLOCK;
-				bio->bi_private = bi_private;
+				bio_init_fields(bio, sb->s_bdev, (sector_t)cur <<
+					LOG_SECTORS_PER_BLOCK, bi_private,
+					z_erofs_decompressqueue_endio, 0, 0);
 				bio->bi_opf = REQ_OP_READ;
 				if (f->readahead)
 					bio->bi_opf |= REQ_RAHEAD;
-- 
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