]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration/multifd: Remove unnecessary assignment on multifd_load_cleanup()
authorLeonardo Bras <leobras@redhat.com>
Fri, 10 Feb 2023 06:36:29 +0000 (03:36 -0300)
committerJuan Quintela <quintela@redhat.com>
Mon, 13 Feb 2023 02:45:28 +0000 (03:45 +0100)
Before assigning "p->quit = true" for every multifd channel,
multifd_load_cleanup() will call multifd_recv_terminate_threads() which
already does the same assignment, while protected by a mutex.

So there is no point doing the same assignment again.

Fixes: b5eea99ec2 ("migration: Add yank feature")
Reported-by: Li Xiaohui <xiaohli@redhat.com>
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/multifd.c

index cac8496edc795842ce3212f0b38b9deb3926a434..3dd569d0c9093718636558c8abe38bdac4d5bc19 100644 (file)
@@ -1025,7 +1025,6 @@ void multifd_load_cleanup(void)
         MultiFDRecvParams *p = &multifd_recv_state->params[i];
 
         if (p->running) {
-            p->quit = true;
             /*
              * multifd_recv_thread may hung at MULTIFD_FLAG_SYNC handle code,
              * however try to wakeup it without harm in cleanup phase.