|
|
383d26 |
From 19dc347405263456be2c13750a97ee4567665c58 Mon Sep 17 00:00:00 2001
|
|
|
383d26 |
From: John Snow <jsnow@redhat.com>
|
|
|
383d26 |
Date: Wed, 27 Mar 2019 17:23:04 +0100
|
|
|
383d26 |
Subject: [PATCH 126/163] nbd/server: Kill pointless shadowed variable
|
|
|
383d26 |
|
|
|
383d26 |
RH-Author: John Snow <jsnow@redhat.com>
|
|
|
383d26 |
Message-id: <20190327172308.31077-52-jsnow@redhat.com>
|
|
|
383d26 |
Patchwork-id: 85217
|
|
|
383d26 |
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 51/55] nbd/server: Kill pointless shadowed variable
|
|
|
383d26 |
Bugzilla: 1691009
|
|
|
383d26 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
From: Eric Blake <eblake@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
lgtm.com pointed out that commit 678ba275 introduced a shadowed
|
|
|
383d26 |
declaration of local variable 'bs'; thankfully, the inner 'bs'
|
|
|
383d26 |
obtained by 'blk_bs(blk)' matches the outer one given that we had
|
|
|
383d26 |
'blk_insert_bs(blk, bs, errp)' a few lines earlier, and there are
|
|
|
383d26 |
no later uses of 'bs' beyond the scope of the 'if (bitmap)' to
|
|
|
383d26 |
care if we change the value stored in 'bs' while traveling the
|
|
|
383d26 |
backing chain to find a bitmap. So simply get rid of the extra
|
|
|
383d26 |
declaration.
|
|
|
383d26 |
|
|
|
383d26 |
Reported-by: Peter Maydell <peter.maydell@linaro.org>
|
|
|
383d26 |
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
383d26 |
Message-Id: <20190207191357.6665-1-eblake@redhat.com>
|
|
|
383d26 |
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
383d26 |
(cherry picked from commit 269ee27e99cfbff983a9ab067ae22f6182f11fe2)
|
|
|
383d26 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
383d26 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
---
|
|
|
383d26 |
nbd/server.c | 1 -
|
|
|
383d26 |
1 file changed, 1 deletion(-)
|
|
|
383d26 |
|
|
|
383d26 |
diff --git a/nbd/server.c b/nbd/server.c
|
|
|
383d26 |
index 838c150..0910d09 100644
|
|
|
383d26 |
--- a/nbd/server.c
|
|
|
383d26 |
+++ b/nbd/server.c
|
|
|
383d26 |
@@ -1495,7 +1495,6 @@ NBDExport *nbd_export_new(BlockDriverState *bs, uint64_t dev_offset,
|
|
|
383d26 |
|
|
|
383d26 |
if (bitmap) {
|
|
|
383d26 |
BdrvDirtyBitmap *bm = NULL;
|
|
|
383d26 |
- BlockDriverState *bs = blk_bs(blk);
|
|
|
383d26 |
|
|
|
383d26 |
while (true) {
|
|
|
383d26 |
bm = bdrv_find_dirty_bitmap(bs, bitmap);
|
|
|
383d26 |
--
|
|
|
383d26 |
1.8.3.1
|
|
|
383d26 |
|