Skip to content

Commit

Permalink
kvm,async_pf: Use swq_has_sleeper()
Browse files Browse the repository at this point in the history
... 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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
Davidlohr Bueso authored and bonzini committed Sep 15, 2017
1 parent 8cd641e commit b9f67a4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions virt/kvm/async_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b9f67a4

Please sign in to comment.