summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2017-09-13 13:08:19 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2017-09-15 16:57:11 +0200
commitb9f67a420b3d76991592558af06e9cf1b8953b3d (patch)
treec5c72322aea9ca523d6e7eba1214fa6fffb4da37
parent8cd641e3c7cbf86c7cbd2a17a160dd137d86c860 (diff)
downloadlwn-b9f67a420b3d76991592558af06e9cf1b8953b3d.tar.gz
lwn-b9f67a420b3d76991592558af06e9cf1b8953b3d.zip
kvm,async_pf: Use swq_has_sleeper()
... 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>
-rw-r--r--virt/kvm/async_pf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c
index bb298a200cd3..57bcb27dcf30 100644
--- a/virt/kvm/async_pf.c
+++ b/virt/kvm/async_pf.c
@@ -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);