]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: checkpoint: Don't clear current checkpoint when redefining an existing one
authorPeter Krempa <pkrempa@redhat.com>
Tue, 1 Oct 2019 05:22:14 +0000 (07:22 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 24 Oct 2019 17:35:34 +0000 (19:35 +0200)
There's no point in clearing the current checkpoint when we are just
changing the definition of the current checkpoint as by the virtue of the
'update_current' flag the same checkpoint would become current in
qemuCheckpointCreateXML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/checkpoint_conf.c

index 62ec9ced41bca4c0686a467e47e7f13740ed40a2..71eac76a1531ca41d5be9e7789003c5ceab953af 100644 (file)
@@ -569,11 +569,6 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
                                            def->parent.dom, xmlopt))
             return -1;
 
-        if (other == virDomainCheckpointGetCurrent(vm->checkpoints)) {
-            *update_current = true;
-            virDomainCheckpointSetCurrent(vm->checkpoints, NULL);
-        }
-
         /* Drop and rebuild the parent relationship, but keep all
          * child relations by reusing chk.  */
         virDomainMomentDropParent(other);