diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2015-05-21 18:00:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-25 07:06:59 +0300 |
commit | a60e3cc7c92973a31fad0fd04dc5cf4355d3d1ef (patch) | |
tree | fccece19424d49db1c03ef8f204f3c7ca3478a4a /net/ipv4/tcp.c | |
parent | 869e7c62486ec0e170a9771acaa251d1a33b5871 (diff) | |
download | linux-a60e3cc7c92973a31fad0fd04dc5cf4355d3d1ef.tar.xz |
net: make skb_splice_bits more configureable
Prepare skb_splice_bits to be able to deal with AF_UNIX sockets.
AF_UNIX sockets don't use lock_sock/release_sock and thus we have to
use a callback to make the locking and unlocking configureable.
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 90afcec3f427..65f791f74845 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -695,8 +695,9 @@ static int tcp_splice_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb, struct tcp_splice_state *tss = rd_desc->arg.data; int ret; - ret = skb_splice_bits(skb, offset, tss->pipe, min(rd_desc->count, len), - tss->flags); + ret = skb_splice_bits(skb, skb->sk, offset, tss->pipe, + min(rd_desc->count, len), tss->flags, + skb_socket_splice); if (ret > 0) rd_desc->count -= ret; return ret; |