Subject: [PATCH 14/16] netfilter: Replace spin_is_locked() with lockdep

From: Lance Roy <[email-masked]>
Date: Tue, 2 Oct 2018 22:39:00 -0700

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-masked]>
Cc: Pablo Neira Ayuso <[email-masked]>
Cc: Jozsef Kadlecsik <[email-masked]>
Cc: Florian Westphal <[email-masked]>
Cc: "David S. Miller" <[email-masked]>
Cc: <[email-masked]>
Cc: <[email-masked]>
Cc: <[email-masked]>
---
 net/netfilter/ipset/ip_set_hash_gen.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index 8a33dac4e805..e287da68d5fa 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -15,7 +15,7 @@
 
 #define __ipset_dereference_protected(p, c)	rcu_dereference_protected(p, c)
 #define ipset_dereference_protected(p, set) \
-	__ipset_dereference_protected(p, spin_is_locked(&(set)->lock))
+	__ipset_dereference_protected(p, lockdep_is_held(&(set)->lock))
 
 #define rcu_dereference_bh_nfnl(p)	rcu_dereference_bh_check(p, 1)
 
-- 
2.19.0