[libvirt] [PATCH RFC 21/40] conf: checkpoint: Don't clear current checkpoint when redefining

Peter Krempa pkrempa at redhat.com
Fri Oct 18 16:11:06 UTC 2019


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 <pkrempa at redhat.com>
---
 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 7f2cfd7f4c..cbff2a0db0 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -562,10 +562,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);
-- 
2.21.0




More information about the libvir-list mailing list