From: Fam Zheng Date: Mon, 16 Dec 2013 06:45:33 +0000 (+0800) Subject: commit: Remove unused check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=18da7f94cdce130f2a71387de4980ffa817181a1;p=qemu.git commit: Remove unused check We support top == active for commit now, remove the check and add an assertion here. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- diff --git a/block/commit.c b/block/commit.c index d4090cbf7d..acec4ac5a8 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;