aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/sock.h29
1 files changed, 2 insertions, 27 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index e329d05f799..7d500a825e4 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1192,33 +1192,8 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
}
}
-static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
- int size, int mem,
- gfp_t gfp)
-{
- struct sk_buff *skb;
-
- /* The TCP header must be at least 32-bit aligned. */
- size = ALIGN(size, 4);
-
- skb = alloc_skb_fclone(size + sk->sk_prot->max_header, gfp);
- if (skb) {
- skb->truesize += mem;
- if (sk_stream_wmem_schedule(sk, skb->truesize)) {
- /*
- * Make sure that we have exactly size bytes
- * available to the caller, no more, no less.
- */
- skb_reserve(skb, skb_tailroom(skb) - size);
- return skb;
- }
- __kfree_skb(skb);
- } else {
- sk->sk_prot->enter_memory_pressure();
- sk_stream_moderate_sndbuf(sk);
- }
- return NULL;
-}
+struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
+ int size, int mem, gfp_t gfp);
static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk,
int size,