From d374389974379a46eeb5d320d4014c092dc26582 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 1 Oct 2019 08:10:18 +0200 Subject: [PATCH] conf: checkpoint: Don't clear current checkpoint when redefining MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we are updating the current checkpoint when redefining by mentioning the current checkpoint as a parent of the newly redefined one we don't have to clear it first. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/conf/checkpoint_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 71eac76a15..5b2723332d 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -556,10 +556,8 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm, if (def->parent.parent_name && (parent = virDomainCheckpointFindByName(vm->checkpoints, def->parent.parent_name))) { - if (parent == virDomainCheckpointGetCurrent(vm->checkpoints)) { + if (parent == virDomainCheckpointGetCurrent(vm->checkpoints)) *update_current = true; - virDomainCheckpointSetCurrent(vm->checkpoints, NULL); - } } other = virDomainCheckpointFindByName(vm->checkpoints, def->parent.name);