mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
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 <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: "Radim Krčmář" <[email protected]> Cc: <[email protected]> Acked-by: Paolo Bonzini <[email protected]>
This commit is contained in:
+1
-1
@@ -4083,7 +4083,7 @@ static int kvm_suspend(void)
|
||||
static void kvm_resume(void)
|
||||
{
|
||||
if (kvm_usage_count) {
|
||||
WARN_ON(raw_spin_is_locked(&kvm_count_lock));
|
||||
lockdep_assert_held(&kvm_count_lock);
|
||||
hardware_enable_nolock(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user