net/sock: Add sock_efree() function
authorBen Hutchings <ben@decadent.org.uk>
Fri, 3 Mar 2017 02:32:07 +0000 (02:32 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:27:13 +0000 (02:27 +0000)
Extracted from commit 62bccb8cdb69 ("net-timestamp: Make the clone operation
stand-alone from phy timestamping").

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/net/sock.h
net/core/sock.c

index 07ede95596bbb720de5ff299e76efa21865d0b5b..b67501ccbedf663db82528717fb9530d929ced0b 100644 (file)
@@ -1569,6 +1569,7 @@ struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
 void sock_wfree(struct sk_buff *skb);
 void skb_orphan_partial(struct sk_buff *skb);
 void sock_rfree(struct sk_buff *skb);
+void sock_efree(struct sk_buff *skb);
 void sock_edemux(struct sk_buff *skb);
 
 int sock_setsockopt(struct socket *sock, int level, int op,
index 9cb00d1ea140d72904baedb49b6aab2f0f5ba120..1c2314fa672eb5036e403b2494d90e201887d2de 100644 (file)
@@ -1678,6 +1678,12 @@ void sock_rfree(struct sk_buff *skb)
 }
 EXPORT_SYMBOL(sock_rfree);
 
+void sock_efree(struct sk_buff *skb)
+{
+       sock_put(skb->sk);
+}
+EXPORT_SYMBOL(sock_efree);
+
 void sock_edemux(struct sk_buff *skb)
 {
        struct sock *sk = skb->sk;