diff mbox series

[net-next,3/7] net: un-hide lockdep_sock_is_held() for !LOCKDEP

Message ID 20200916184528.498184-4-kuba@kernel.org
State New
Headers show
Series None | expand

Commit Message

Jakub Kicinski Sept. 16, 2020, 6:45 p.m. UTC
We're trying to make LOCKDEP-related function declarations
visible to the compiler and depend on dead code elimination
to remove them.

Un-hide lockdep_sock_is_held().

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 include/net/sock.h | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/include/net/sock.h b/include/net/sock.h
index eaa5cac5e836..1c67b1297a72 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1566,13 +1566,11 @@  do {									\
 	lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0);	\
 } while (0)
 
-#ifdef CONFIG_LOCKDEP
 static inline bool lockdep_sock_is_held(const struct sock *sk)
 {
 	return lockdep_is_held(&sk->sk_lock) ||
 	       lockdep_is_held(&sk->sk_lock.slock);
 }
-#endif
 
 void lock_sock_nested(struct sock *sk, int subclass);