diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2014-09-04 19:32:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-06 02:43:45 +0200 |
commit | 82eabd9eb2ec1603282a2c3f74dfcb6fe0aaea0e (patch) | |
tree | 3f1064b6b501005f741bacc74e9ed370c2ffb996 /net/core | |
parent | net-timestamp: Make the clone operation stand-alone from phy timestamping (diff) | |
download | linux-82eabd9eb2ec1603282a2c3f74dfcb6fe0aaea0e.tar.xz linux-82eabd9eb2ec1603282a2c3f74dfcb6fe0aaea0e.zip |
net: merge cases where sock_efree and sock_edemux are the same function
Since sock_efree and sock_demux are essentially the same code for non-TCP
sockets and the case where CONFIG_INET is not defined we can combine the
code or replace the call to sock_edemux in several spots. As a result we
can avoid a bit of unnecessary code or code duplication.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index d04005c51724..69592cb66e3b 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1643,18 +1643,18 @@ void sock_efree(struct sk_buff *skb) } EXPORT_SYMBOL(sock_efree); +#ifdef CONFIG_INET void sock_edemux(struct sk_buff *skb) { struct sock *sk = skb->sk; -#ifdef CONFIG_INET if (sk->sk_state == TCP_TIME_WAIT) inet_twsk_put(inet_twsk(sk)); else -#endif sock_put(sk); } EXPORT_SYMBOL(sock_edemux); +#endif kuid_t sock_i_uid(struct sock *sk) { |