mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-02 22:41:07 +00:00
block: block_dirty_bitmap_merge(): fix error path
At the end we ignore failure of bdrv_merge_dirty_bitmap() and report success. And still set errp. That's wrong. Signed-off-by: Vladimir Sementsov-Ogievskiy <v.sementsov-og@mail.ru> Reviewed-by: Nikita Lapshin <nikita.lapshin@virtuozzo.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20220517111206.23585-2-v.sementsov-og@mail.ru> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
1ab5096b3a
commit
775b30b305
1 changed files with 4 additions and 1 deletions
|
@ -309,7 +309,10 @@ BdrvDirtyBitmap *block_dirty_bitmap_merge(const char *node, const char *target,
|
|||
}
|
||||
|
||||
/* Merge into dst; dst is unchanged on failure. */
|
||||
bdrv_merge_dirty_bitmap(dst, anon, backup, errp);
|
||||
if (!bdrv_merge_dirty_bitmap(dst, anon, backup, errp)) {
|
||||
dst = NULL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
bdrv_release_dirty_bitmap(anon);
|
||||
|
|
Loading…
Reference in a new issue