Commit 4cc7f68d65558f683c702d4fe3a5aac4c5227b97
Committed by
David S. Miller
1 parent
9a279bcbe3
Exists in
master
and in
4 other branches
net: Reexport sock_alloc_send_pskb
The function sock_alloc_send_pskb is completely useless if not exported since most of the code in it won't be used as is. In fact, this code has already been duplicated in the tun driver. Now that we need accounting in the tun driver, we can in fact use this function as is. So this patch marks it for export again. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 9 additions and 4 deletions Side-by-side Diff
include/net/sock.h
| ... | ... | @@ -945,6 +945,11 @@ |
| 945 | 945 | unsigned long size, |
| 946 | 946 | int noblock, |
| 947 | 947 | int *errcode); |
| 948 | +extern struct sk_buff *sock_alloc_send_pskb(struct sock *sk, | |
| 949 | + unsigned long header_len, | |
| 950 | + unsigned long data_len, | |
| 951 | + int noblock, | |
| 952 | + int *errcode); | |
| 948 | 953 | extern void *sock_kmalloc(struct sock *sk, int size, |
| 949 | 954 | gfp_t priority); |
| 950 | 955 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); |
net/core/sock.c
| ... | ... | @@ -1254,10 +1254,9 @@ |
| 1254 | 1254 | * Generic send/receive buffer handlers |
| 1255 | 1255 | */ |
| 1256 | 1256 | |
| 1257 | -static struct sk_buff *sock_alloc_send_pskb(struct sock *sk, | |
| 1258 | - unsigned long header_len, | |
| 1259 | - unsigned long data_len, | |
| 1260 | - int noblock, int *errcode) | |
| 1257 | +struct sk_buff *sock_alloc_send_pskb(struct sock *sk, unsigned long header_len, | |
| 1258 | + unsigned long data_len, int noblock, | |
| 1259 | + int *errcode) | |
| 1261 | 1260 | { |
| 1262 | 1261 | struct sk_buff *skb; |
| 1263 | 1262 | gfp_t gfp_mask; |
| ... | ... | @@ -1337,6 +1336,7 @@ |
| 1337 | 1336 | *errcode = err; |
| 1338 | 1337 | return NULL; |
| 1339 | 1338 | } |
| 1339 | +EXPORT_SYMBOL(sock_alloc_send_pskb); | |
| 1340 | 1340 | |
| 1341 | 1341 | struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, |
| 1342 | 1342 | int noblock, int *errcode) |