aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Roy <[email protected]>2018-10-02 22:38:48 -0700
committerGreg Kroah-Hartman <[email protected]>2018-10-15 20:54:17 +0200
commit1c87dc897b8c8ace3aa4480fa29ef6439dabb3ab (patch)
treef6921c9a94e984133c0eb2649d824102f2dfe588
parentf21996255f42eee28048ede652a592d6048b06b3 (diff)
hv_balloon: Replace spin_is_locked() with lockdep
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Stephen Hemminger <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/hv/hv_balloon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c
index b1b788082793..41631512ae97 100644
--- a/drivers/hv/hv_balloon.c
+++ b/drivers/hv/hv_balloon.c
@@ -689,7 +689,7 @@ static void hv_page_online_one(struct hv_hotadd_state *has, struct page *pg)
__online_page_increment_counters(pg);
__online_page_free(pg);
- WARN_ON_ONCE(!spin_is_locked(&dm_device.ha_lock));
+ lockdep_assert_held(&dm_device.ha_lock);
dm_device.num_pages_onlined++;
}