From: Tom Herbert Date: Thu, 28 Dec 2017 19:00:43 +0000 (-0800) Subject: sock: Add sock_owned_by_user_nocheck X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=602f7a2714a3b3aa4bec82ab0a86a9f5a2c4aa61;p=openwrt%2Fstaging%2Fblogic.git sock: Add sock_owned_by_user_nocheck This allows checking socket lock ownership with producing lockdep warnings. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller --- diff --git a/include/net/sock.h b/include/net/sock.h index 9155da422692..7a7b14e9628a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1514,6 +1514,11 @@ static inline bool sock_owned_by_user(const struct sock *sk) return sk->sk_lock.owned; } +static inline bool sock_owned_by_user_nocheck(const struct sock *sk) +{ + return sk->sk_lock.owned; +} + /* no reclassification while locks are held */ static inline bool sock_allow_reclassification(const struct sock *csk) {