From: Lance Roy Date: Wed, 3 Oct 2018 05:38:48 +0000 (-0700) Subject: hv_balloon: Replace spin_is_locked() with lockdep X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1c87dc897b8c8ace3aa4480fa29ef6439dabb3ab;p=linux.git 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 Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Reviewed-by: Vitaly Kuznetsov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index b1b7880827931..41631512ae97e 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++; }