yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-block-qcow2-bitmap-fix-free_bitmap_clusters.patch

26ba25
From ea69d5b7e4b59362f9d42b4e7e40f5c2fcc7b31b Mon Sep 17 00:00:00 2001
26ba25
From: John Snow <jsnow@redhat.com>
26ba25
Date: Wed, 18 Jul 2018 22:54:44 +0200
26ba25
Subject: [PATCH 226/268] block/qcow2-bitmap: fix free_bitmap_clusters
26ba25
26ba25
RH-Author: John Snow <jsnow@redhat.com>
26ba25
Message-id: <20180718225511.14878-9-jsnow@redhat.com>
26ba25
Patchwork-id: 81392
26ba25
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 08/35] block/qcow2-bitmap: fix free_bitmap_clusters
26ba25
Bugzilla: 1207657
26ba25
RH-Acked-by: Eric Blake <eblake@redhat.com>
26ba25
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
26ba25
RH-Acked-by: Fam Zheng <famz@redhat.com>
26ba25
26ba25
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
26ba25
26ba25
This assert may fail, because bitmap_table is not initialized. Just
26ba25
drop it, as it's obvious, that bitmap_table_load sets bitmap_table
26ba25
parameter only when returning zero.
26ba25
26ba25
Reported-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
26ba25
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
26ba25
Message-id: 20180608101225.2575-1-vsementsov@virtuozzo.com
26ba25
Signed-off-by: Max Reitz <mreitz@redhat.com>
26ba25
(cherry picked from commit 7eb24009dbf8102fc27d5459bec1cb8a932540c4)
26ba25
Signed-off-by: John Snow <jsnow@redhat.com>
26ba25
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
26ba25
---
26ba25
 block/qcow2-bitmap.c | 1 -
26ba25
 1 file changed, 1 deletion(-)
26ba25
26ba25
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
26ba25
index 6e93ec4..3e4e4e4 100644
26ba25
--- a/block/qcow2-bitmap.c
26ba25
+++ b/block/qcow2-bitmap.c
26ba25
@@ -254,7 +254,6 @@ static int free_bitmap_clusters(BlockDriverState *bs, Qcow2BitmapTable *tb)
26ba25
 
26ba25
     ret = bitmap_table_load(bs, tb, &bitmap_table);
26ba25
     if (ret < 0) {
26ba25
-        assert(bitmap_table == NULL);
26ba25
         return ret;
26ba25
     }
26ba25
 
26ba25
-- 
26ba25
1.8.3.1
26ba25