Commit b33b0a1b authored by David S. Miller's avatar David S. Miller

net: Fix build failure due to lockdep_sock_is_held().

Needs to be protected with CONFIG_LOCKDEP.

Based upon a patch by Hannes Frederic Sowa.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 03be9822
...@@ -1360,6 +1360,7 @@ do { \ ...@@ -1360,6 +1360,7 @@ do { \
lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); \ lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); \
} while (0) } while (0)
#ifdef CONFIG_LOCKDEP
static inline bool lockdep_sock_is_held(const struct sock *csk) static inline bool lockdep_sock_is_held(const struct sock *csk)
{ {
struct sock *sk = (struct sock *)csk; struct sock *sk = (struct sock *)csk;
...@@ -1367,6 +1368,7 @@ static inline bool lockdep_sock_is_held(const struct sock *csk) ...@@ -1367,6 +1368,7 @@ static inline bool lockdep_sock_is_held(const struct sock *csk)
return lockdep_is_held(&sk->sk_lock) || return lockdep_is_held(&sk->sk_lock) ||
lockdep_is_held(&sk->sk_lock.slock); lockdep_is_held(&sk->sk_lock.slock);
} }
#endif
void lock_sock_nested(struct sock *sk, int subclass); void lock_sock_nested(struct sock *sk, int subclass);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment