diff mbox series

[10/11] md/raid10: remove dead code in reshape_request

Message ID 20210202171929.1504939-11-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/11] block: reuse BIO_INLINE_VECS for integrity bvecs | expand

Commit Message

Christoph Hellwig Feb. 2, 2021, 5:19 p.m. UTC
A bio allocated by bio_alloc_bioset comes pre-zeroed, no need to
clear random fields.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/md/raid10.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Song Liu Feb. 4, 2021, 5:57 p.m. UTC | #1
On Tue, Feb 2, 2021 at 9:19 AM Christoph Hellwig <hch@lst.de> wrote:
>
> A bio allocated by bio_alloc_bioset comes pre-zeroed, no need to
> clear random fields.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Song Liu <song@kernel.org>
diff mbox series

Patch

diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index e1eefbec15d444..a9ae7d113492c9 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -4539,10 +4539,6 @@  static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr,
 	read_bio->bi_private = r10_bio;
 	read_bio->bi_end_io = end_reshape_read;
 	bio_set_op_attrs(read_bio, REQ_OP_READ, 0);
-	read_bio->bi_flags &= (~0UL << BIO_RESET_BITS);
-	read_bio->bi_status = 0;
-	read_bio->bi_vcnt = 0;
-	read_bio->bi_iter.bi_size = 0;
 	r10_bio->master_bio = read_bio;
 	r10_bio->read_slot = r10_bio->devs[r10_bio->read_slot].devnum;