From: David S. Miller Date: Fri, 8 Apr 2016 00:40:25 +0000 (-0400) Subject: net: Fix build failure due to lockdep_sock_is_held(). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b33b0a1bf69faff89693df49519fa7b459f5d807;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: David S. Miller --- diff --git a/include/net/sock.h b/include/net/sock.h index 46b29374df8e..81d6fecec0a2 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1360,6 +1360,7 @@ 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 *csk) { struct sock *sk = (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) || lockdep_is_held(&sk->sk_lock.slock); } +#endif void lock_sock_nested(struct sock *sk, int subclass);