aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/net/sock.h10
-rw-r--r--net/ipv4/tcp.c11
-rw-r--r--net/ipv4/tcp_output.c2
3 files changed, 6 insertions, 17 deletions
diff --git a/include/net/sock.h b/include/net/sock.h
index 7d500a825e4..bcbf8891dde 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1192,15 +1192,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk)
}
}
-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,
- gfp_t gfp)
-{
- return sk_stream_alloc_pskb(sk, size, 0, gfp);
-}
+struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp);
static inline struct page *sk_stream_alloc_page(struct sock *sk)
{
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 6b35ab841db..eb77088f305 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -629,8 +629,7 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
return ret;
}
-struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
- int size, int mem, gfp_t gfp)
+struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp)
{
struct sk_buff *skb;
@@ -639,7 +638,6 @@ struct sk_buff *sk_stream_alloc_pskb(struct sock *sk,
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
@@ -692,8 +690,7 @@ new_segment:
if (!sk_stream_memory_free(sk))
goto wait_for_sndbuf;
- skb = sk_stream_alloc_pskb(sk, 0, 0,
- sk->sk_allocation);
+ skb = sk_stream_alloc_skb(sk, 0, sk->sk_allocation);
if (!skb)
goto wait_for_memory;
@@ -873,8 +870,8 @@ new_segment:
if (!sk_stream_memory_free(sk))
goto wait_for_sndbuf;
- skb = sk_stream_alloc_pskb(sk, select_size(sk),
- 0, sk->sk_allocation);
+ skb = sk_stream_alloc_skb(sk, select_size(sk),
+ sk->sk_allocation);
if (!skb)
goto wait_for_memory;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 546f385a405..98835afb8d8 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1180,7 +1180,7 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len,
if (skb->len != skb->data_len)
return tcp_fragment(sk, skb, len, mss_now);
- buff = sk_stream_alloc_pskb(sk, 0, 0, GFP_ATOMIC);
+ buff = sk_stream_alloc_skb(sk, 0, GFP_ATOMIC);
if (unlikely(buff == NULL))
return -ENOMEM;