aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kvm_host.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index c8a9d628898e..e820eb579108 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -636,7 +636,12 @@ static inline bool kvm_make_check_request(int req, struct kvm_vcpu *vcpu)
636 636
637static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu) 637static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu)
638{ 638{
639 return test_and_clear_bit(req, &vcpu->requests); 639 if (test_bit(req, &vcpu->requests)) {
640 clear_bit(req, &vcpu->requests);
641 return true;
642 } else {
643 return false;
644 }
640} 645}
641 646
642#endif 647#endif