mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
block: use return status of bdrv_append()
Now bdrv_append returns status and we can drop all the local_err things around it. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <20210202124956.63146-3-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
committed by
Eric Blake
parent
a1e708fcda
commit
934aee14d3
@@ -1432,6 +1432,7 @@ typedef struct ExternalSnapshotState {
|
||||
static void external_snapshot_prepare(BlkActionState *common,
|
||||
Error **errp)
|
||||
{
|
||||
int ret;
|
||||
int flags = 0;
|
||||
QDict *options = NULL;
|
||||
Error *local_err = NULL;
|
||||
@@ -1591,9 +1592,8 @@ static void external_snapshot_prepare(BlkActionState *common,
|
||||
* can fail, so we need to do it in .prepare; undoing it for abort is
|
||||
* always possible. */
|
||||
bdrv_ref(state->new_bs);
|
||||
bdrv_append(state->new_bs, state->old_bs, &local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
ret = bdrv_append(state->new_bs, state->old_bs, errp);
|
||||
if (ret < 0) {
|
||||
goto out;
|
||||
}
|
||||
state->overlay_appended = true;
|
||||
|
||||
Reference in New Issue
Block a user