From 1d78e14b1774a799db6336a4381f91a7af295f38 Mon Sep 17 00:00:00 2001
From: Fam Zheng <famz@redhat.com>
Date: Fri, 17 Jan 2014 03:08:03 +0100
Subject: [PATCH 20/34] commit: Remove unused check
RH-Author: Fam Zheng <famz@redhat.com>
Message-id: <1389928083-8921-19-git-send-email-famz@redhat.com>
Patchwork-id: 56780
O-Subject: [RHEL-7 qemu-kvm PATCH 18/18] commit: Remove unused check
Bugzilla: 1041301
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
We support top == active for commit now, remove the check and add an
assertion here.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 18da7f94cdce130f2a71387de4980ffa817181a1)
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block/commit.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
block/commit.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index d237729..e3e395d 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -198,13 +198,7 @@ void commit_start(BlockDriverState *bs, BlockDriverState *base,
return;
}
- /* Once we support top == active layer, remove this check */
- if (top == bs) {
- error_setg(errp,
- "Top image as the active layer is currently unsupported");
- return;
- }
-
+ assert(top != bs);
if (top == base) {
error_setg(errp, "Invalid files for merge: top and base are the same");
return;
--
1.7.1