[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 27/88] snapshot: fix referencing wrong variable in w
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 27/88] snapshot: fix referencing wrong variable in while loop in do_delvm |
Date: |
Thu, 8 Jan 2015 11:33:31 -0600 |
From: Zhang Haoyu <address@hidden>
The while loop variabal is "bs1",
but "bs" is always passed to bdrv_snapshot_delete_by_id_or_name.
Broken in commit a89d89d, v1.7.0.
Signed-off-by: Zhang Haoyu <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit af957387547b05ed6dc4d84c10cca42700a7aeda)
Signed-off-by: Michael Roth <address@hidden>
---
savevm.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/savevm.c b/savevm.c
index e19ae0a..2d8eb96 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1245,19 +1245,18 @@ int load_vmstate(const char *name)
void do_delvm(Monitor *mon, const QDict *qdict)
{
- BlockDriverState *bs, *bs1;
+ BlockDriverState *bs;
Error *err = NULL;
const char *name = qdict_get_str(qdict, "name");
- bs = find_vmstate_bs();
- if (!bs) {
+ if (!find_vmstate_bs()) {
monitor_printf(mon, "No block device supports snapshots\n");
return;
}
- bs1 = NULL;
- while ((bs1 = bdrv_next(bs1))) {
- if (bdrv_can_snapshot(bs1)) {
+ bs = NULL;
+ while ((bs = bdrv_next(bs))) {
+ if (bdrv_can_snapshot(bs)) {
bdrv_snapshot_delete_by_id_or_name(bs, name, &err);
if (err) {
monitor_printf(mon,
--
1.9.1
- [Qemu-devel] [PATCH 17/88] qemu-iotests: Test missing "driver" key for blockdev-add, (continued)
- [Qemu-devel] [PATCH 17/88] qemu-iotests: Test missing "driver" key for blockdev-add, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 18/88] monitor: Reset HMP mon->rs in CHR_EVENT_OPEN, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 20/88] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 22/88] ivshmem: validate incoming_posn value from server, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 24/88] ivshmem: Fix fd leak on error, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 25/88] pc-dimm: Don't check dimm->node when there is non-NUMA config, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 26/88] tests: avoid running duplicate qom-tests, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 33/88] virtio/vhost-scsi: fix virtio-scsi/vhost-scsi child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 28/88] smbios: Fix assertion on socket count calculation, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 38/88] virtio-balloon: fix virtio-balloon child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 27/88] snapshot: fix referencing wrong variable in while loop in do_delvm,
Michael Roth <=
- [Qemu-devel] [PATCH 32/88] virtio/vhost-scsi: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 34/88] virtio-serial: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 31/88] virtio-net: fix virtio-net child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 36/88] virtio-rng: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 35/88] virtio-serial: fix virtio-serial child refcount in transports, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 39/88] virtio-9p: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 42/88] vmware-vga: CVE-2014-3689: turn off hw accel, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 30/88] virtio-net: use aliases instead of duplicate qdev properties, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 29/88] vhost-scsi: use virtio_ldl_p, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 44/88] vmware-vga: use vmsvga_verify_rect in vmsvga_update_rect, Michael Roth, 2015/01/08