Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 602f7a27 authored by Tom Herbert's avatar Tom Herbert Committed by David S. Miller
Browse files

sock: Add sock_owned_by_user_nocheck



This allows checking socket lock ownership with producing lockdep
warnings.

Signed-off-by: default avatarTom Herbert <tom@quantonium.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f72c4ac6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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)
{