lkml.org 
[lkml]   [2021]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 30/37] fs: use bio_init_fields in buffer
Date
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
fs/buffer.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 32647d2011df..32e9f780e134 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3027,16 +3027,13 @@ static int submit_bh_wbc(int op, int op_flags, struct buffer_head *bh,

fscrypt_set_bio_crypt_ctx_bh(bio, bh, GFP_NOIO);

- bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9);
- bio_set_dev(bio, bh->b_bdev);
+ bio_init_fields(bio, bh->b_bdev, bh->b_blocknr * (bh->b_size >> 9),
+ bh, end_bio_bh_io_sync, 0, 0);
bio->bi_write_hint = write_hint;

bio_add_page(bio, bh->b_page, bh->b_size, bh_offset(bh));
BUG_ON(bio->bi_iter.bi_size != bh->b_size);

- bio->bi_end_io = end_bio_bh_io_sync;
- bio->bi_private = bh;
-
if (buffer_meta(bh))
op_flags |= REQ_META;
if (buffer_prio(bh))
--
2.22.1
\
 
 \ /
  Last update: 2021-01-19 07:11    [W:0.268 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site