]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: x86/mmu: remove unnecessary flush_workqueue()
authorLv Ruyi <lv.ruyi@zte.com.cn>
Fri, 1 Apr 2022 08:35:30 +0000 (08:35 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 5 Apr 2022 12:11:12 +0000 (08:11 -0400)
All work currently pending will be done first by calling destroy_workqueue,
so there is unnecessary to flush it explicitly.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220401083530.2407703-1-lv.ruyi@zte.com.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/tdp_mmu.c

index d71d177ae6b8716e98a2a74f91c5e5a0d85231b1..c472769e0300513d2409f3b0a964565bb55dc709 100644 (file)
@@ -51,7 +51,7 @@ void kvm_mmu_uninit_tdp_mmu(struct kvm *kvm)
        if (!kvm->arch.tdp_mmu_enabled)
                return;
 
-       flush_workqueue(kvm->arch.tdp_mmu_zap_wq);
+       /* Also waits for any queued work items.  */
        destroy_workqueue(kvm->arch.tdp_mmu_zap_wq);
 
        WARN_ON(!list_empty(&kvm->arch.tdp_mmu_pages));