[Devel] [PATCH RH9 10/12] dm-qcow2: Remove useless zeroing in qcow2_service_iter()

Kirill Tkhai ktkhai at virtuozzo.com
Wed Jan 19 19:17:46 MSK 2022


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-qcow2-cmd.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/md/dm-qcow2-cmd.c b/drivers/md/dm-qcow2-cmd.c
index 2bcca9f99397..966e3287dcfd 100644
--- a/drivers/md/dm-qcow2-cmd.c
+++ b/drivers/md/dm-qcow2-cmd.c
@@ -57,7 +57,6 @@ static int qcow2_service_iter(struct qcow2_target *tgt, struct qcow2 *qcow2,
 		  loff_t end, loff_t step, unsigned int bi_op, u8 qio_flags)
 {
 	static blk_status_t service_status;
-	struct bio_vec bvec = {0};
 	struct qio *qio;
 	int ret = 0;
 	loff_t pos;
@@ -79,11 +78,8 @@ static int qcow2_service_iter(struct qcow2_target *tgt, struct qcow2 *qcow2,
 		/* See fake_service_qio() */
 		init_qio(qio, bi_op, qcow2);
 		qio->flags |= qio_flags|QIO_FREE_ON_ENDIO_FL;
-		qio->bi_io_vec = &bvec;
 		qio->bi_iter.bi_sector = to_sector(pos);
-		qio->bi_iter.bi_size = 0;
-		qio->bi_iter.bi_idx = 0;
-		qio->bi_iter.bi_bvec_done = 0;
+		/* The rest is zeroed in alloc_qio() */
 		qio->endio_cb = service_qio_endio;
 		qio->endio_cb_data = &service_status;
 




More information about the Devel mailing list