]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
kvm,async_pf: Use swq_has_sleeper()
authorDavidlohr Bueso <dave@stgolabs.net>
Wed, 13 Sep 2017 20:08:19 +0000 (13:08 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Sep 2017 14:57:11 +0000 (16:57 +0200)
... as we've got the new helper now. This caller already
does the right thing, hence no changes in semantics.

Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/async_pf.c

index bb298a200cd3f212d13dd509303eef211b9346de..57bcb27dcf30f61e14361c675617f08a0e995600 100644 (file)
@@ -106,11 +106,7 @@ static void async_pf_execute(struct work_struct *work)
 
        trace_kvm_async_pf_completed(addr, gva);
 
-       /*
-        * This memory barrier pairs with prepare_to_wait's set_current_state()
-        */
-       smp_mb();
-       if (swait_active(&vcpu->wq))
+       if (swq_has_sleeper(&vcpu->wq))
                swake_up(&vcpu->wq);
 
        mmput(mm);