[Devel] [PATCH RHEL9 COMMIT] dm-qcow2: Remove useless zeroing in qcow2_service_iter()

Konstantin Khorenko khorenko at virtuozzo.com
Thu Mar 24 00:23:59 MSK 2022


The commit is pushed to "branch-rh9-5.14.0-42.vz9.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-42.vz9.14.4
------>
commit 38f150344bc9b3bd9f05b79a367cd8ab61d8297d
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Mar 24 00:23:59 2022 +0300

    dm-qcow2: Remove useless zeroing in qcow2_service_iter()
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    Feature: dm-qcow2: block device over QCOW2 files driver
---
 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 45a114c74748..f9a47b87dead 100644
--- a/drivers/md/dm-qcow2-cmd.c
+++ b/drivers/md/dm-qcow2-cmd.c
@@ -55,7 +55,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;
@@ -77,11 +76,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