migration: fix saving normal page even if it's been compressed
authorXiao Guangrong <xiaoguangrong@tencent.com>
Sat, 28 Apr 2018 08:10:45 +0000 (16:10 +0800)
committerJuan Quintela <quintela@redhat.com>
Tue, 15 May 2018 18:24:00 +0000 (20:24 +0200)
Fix the bug introduced by da3f56cb2e767016 (migration: remove
ram_save_compressed_page()), It should be 'return' rather than
'res'

Sorry for this stupid mistake :(

Signed-off-by: Xiao Guangrong <xiaoguangrong@tencent.com>
Message-Id: <20180428081045.8878-1-xiaoguangrong@tencent.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/ram.c

index 912810c18e0fdc17f20a52ff8edcd47f4a96bbf4..da0b567003d4330483999cf62a8a7e5540ffeaa4 100644 (file)
@@ -1490,7 +1490,7 @@ static int ram_save_target_page(RAMState *rs, PageSearchStatus *pss,
      * CPU resource.
      */
     if (block == rs->last_sent_block && save_page_use_compression(rs)) {
-        res = compress_page_with_multi_thread(rs, block, offset);
+        return compress_page_with_multi_thread(rs, block, offset);
     }
 
     return ram_save_page(rs, pss, last_stage);