]> Git Repo - qemu.git/blobdiff - migration/ram.c
target-alpha: Special case cmpbge with zero
[qemu.git] / migration / ram.c
index c69681419619876a49ef7728cd6d081cbd1d7500..7f007e6432a10203030b39e9977cf8330e15b047 100644 (file)
@@ -382,16 +382,16 @@ void migrate_compress_threads_create(void)
  */
 static size_t save_page_header(QEMUFile *f, RAMBlock *block, ram_addr_t offset)
 {
-    size_t size;
+    size_t size, len;
 
     qemu_put_be64(f, offset);
     size = 8;
 
     if (!(offset & RAM_SAVE_FLAG_CONTINUE)) {
-        qemu_put_byte(f, strlen(block->idstr));
-        qemu_put_buffer(f, (uint8_t *)block->idstr,
-                        strlen(block->idstr));
-        size += 1 + strlen(block->idstr);
+        len = strlen(block->idstr);
+        qemu_put_byte(f, len);
+        qemu_put_buffer(f, (uint8_t *)block->idstr, len);
+        size += 1 + len;
     }
     return size;
 }
@@ -1266,9 +1266,10 @@ static int ram_save_complete(QEMUFile *f, void *opaque)
 
     flush_compressed_data(f);
     ram_control_after_iterate(f, RAM_CONTROL_FINISH);
-    migration_end();
 
     rcu_read_unlock();
+
+    migration_end();
     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
 
     return 0;
This page took 0.021565 seconds and 4 git commands to generate.