mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 00:32:00 +00:00
af_unix: Remove unix_our_peer().
unix_our_peer() is used only in unix_may_send(). Let's inline it in unix_may_send(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
62c6db251e
commit
bf61ffeb9c
@ -286,14 +286,9 @@ static inline bool unix_secdata_eq(struct scm_cookie *scm, struct sk_buff *skb)
|
||||
}
|
||||
#endif /* CONFIG_SECURITY_NETWORK */
|
||||
|
||||
static inline int unix_our_peer(struct sock *sk, struct sock *osk)
|
||||
{
|
||||
return unix_peer(osk) == sk;
|
||||
}
|
||||
|
||||
static inline int unix_may_send(struct sock *sk, struct sock *osk)
|
||||
{
|
||||
return unix_peer(osk) == NULL || unix_our_peer(sk, osk);
|
||||
return !unix_peer(osk) || unix_peer(osk) == sk;
|
||||
}
|
||||
|
||||
static inline int unix_recvq_full_lockless(const struct sock *sk)
|
||||
|
Loading…
Reference in New Issue
Block a user