Commit 2c13270b authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

inet: factorize sock_edemux()/sock_gen_put() code

sock_edemux() is not used in fast path, and should
really call sock_gen_put() to save some code.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a58917f5
...@@ -1661,21 +1661,6 @@ void sock_efree(struct sk_buff *skb) ...@@ -1661,21 +1661,6 @@ void sock_efree(struct sk_buff *skb)
} }
EXPORT_SYMBOL(sock_efree); EXPORT_SYMBOL(sock_efree);
#ifdef CONFIG_INET
void sock_edemux(struct sk_buff *skb)
{
struct sock *sk = skb->sk;
if (sk->sk_state == TCP_TIME_WAIT)
inet_twsk_put(inet_twsk(sk));
else if (sk->sk_state == TCP_NEW_SYN_RECV)
reqsk_put(inet_reqsk(sk));
else
sock_put(sk);
}
EXPORT_SYMBOL(sock_edemux);
#endif
kuid_t sock_i_uid(struct sock *sk) kuid_t sock_i_uid(struct sock *sk)
{ {
kuid_t uid; kuid_t uid;
......
...@@ -269,6 +269,12 @@ void sock_gen_put(struct sock *sk) ...@@ -269,6 +269,12 @@ void sock_gen_put(struct sock *sk)
} }
EXPORT_SYMBOL_GPL(sock_gen_put); EXPORT_SYMBOL_GPL(sock_gen_put);
void sock_edemux(struct sk_buff *skb)
{
sock_gen_put(skb->sk);
}
EXPORT_SYMBOL(sock_edemux);
struct sock *__inet_lookup_established(struct net *net, struct sock *__inet_lookup_established(struct net *net,
struct inet_hashinfo *hashinfo, struct inet_hashinfo *hashinfo,
const __be32 saddr, const __be16 sport, const __be32 saddr, const __be16 sport,
......
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