blockdev: fix bitmap clear undo
Only undo the action if we actually prepared the action. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
c1cef67251
commit
184dd9c49b
@ -2047,7 +2047,9 @@ static void block_dirty_bitmap_clear_abort(BlkActionState *common)
|
||||
BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
|
||||
common, common);
|
||||
|
||||
bdrv_undo_clear_dirty_bitmap(state->bitmap, state->backup);
|
||||
if (state->backup) {
|
||||
bdrv_undo_clear_dirty_bitmap(state->bitmap, state->backup);
|
||||
}
|
||||
}
|
||||
|
||||
static void block_dirty_bitmap_clear_commit(BlkActionState *common)
|
||||
|
Loading…
Reference in New Issue
Block a user