diff options
| author | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-01-08 13:39:49 -0500 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.ibm.com> | 2019-01-25 18:36:05 -0500 |
| commit | 6706dae90d85d394d0134d0ec516c25560b9ce77 (patch) | |
| tree | 9f3f10eb1cb61d51ca5a8c1c7fb1d8b3b5cd487b | |
| parent | 728e3e6178aa5790066b642dd2ebc9e9bdacff1b (diff) | |
virt/kvm: Replace spin_is_locked() with lockdep
lockdep_assert_held() is better suited to checking locking requirements,
since it only checks if the current thread holds the lock regardless of
whether someone else does. This is also a step towards possibly removing
spin_is_locked().
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: <kvm@vger.kernel.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 5ecea812cb6a..28de87ff9f51 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
| @@ -4083,7 +4083,7 @@ static int kvm_suspend(void) | |||
| 4083 | static void kvm_resume(void) | 4083 | static void kvm_resume(void) |
| 4084 | { | 4084 | { |
| 4085 | if (kvm_usage_count) { | 4085 | if (kvm_usage_count) { |
| 4086 | WARN_ON(raw_spin_is_locked(&kvm_count_lock)); | 4086 | lockdep_assert_held(&kvm_count_lock); |
| 4087 | hardware_enable_nolock(NULL); | 4087 | hardware_enable_nolock(NULL); |
| 4088 | } | 4088 | } |
| 4089 | } | 4089 | } |
