After thread synchronization request is handled in another case, this means when we only get pending_job when there is used pages.
Signed-off-by: Wei Yang <richardw.y...@linux.intel.com> --- migration/ram.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 9982930392..3e48795608 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1118,12 +1118,11 @@ static void *multifd_send_thread(void *opaque) break; } - if (used) { - ret = qio_channel_writev_all(p->c, p->pages->iov, + assert(used); + ret = qio_channel_writev_all(p->c, p->pages->iov, used, &local_err); - if (ret != 0) { - break; - } + if (ret != 0) { + break; } qemu_mutex_lock(&p->mutex); -- 2.19.1