]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
commit: Remove unused check
authorFam Zheng <famz@redhat.com>
Mon, 16 Dec 2013 06:45:33 +0000 (14:45 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 20 Dec 2013 15:26:16 +0000 (16:26 +0100)
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>
block/commit.c

index d4090cbf7de11ba9e6c8de3302ebaefeea55f901..acec4ac5a828da4d17361746a5593c3229d097f8 100644 (file)
@@ -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;