diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2017-03-03 02:32:07 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-03-16 02:18:49 +0000 |
commit | 76f6adf05c7682a090a8bb738a728e90e0130959 (patch) | |
tree | d599a37d35de73b11a4a6a7fadbd518c8a639432 | |
parent | ddd8309bd85c93455b993207dd5209ee937070e9 (diff) |
net/sock: Add sock_efree() function
Extracted from commit 62bccb8cdb69 ("net-timestamp: Make the clone operation
stand-alone from phy timestamping").
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | include/net/sock.h | 1 | ||||
-rw-r--r-- | net/core/sock.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 1444b523264b2..8ae4a483a9a92 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1117,6 +1117,7 @@ extern struct sk_buff *sock_rmalloc(struct sock *sk, gfp_t priority); extern void sock_wfree(struct sk_buff *skb); extern void sock_rfree(struct sk_buff *skb); +void sock_efree(struct sk_buff *skb); extern int sock_setsockopt(struct socket *sock, int level, int op, char __user *optval, diff --git a/net/core/sock.c b/net/core/sock.c index 07c078e3f5705..54a21d437db4e 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1369,6 +1369,11 @@ 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); int sock_i_uid(struct sock *sk) { |