diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2015-05-21 11:00:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-25 00:06:59 -0400 |
commit | a60e3cc7c92973a31fad0fd04dc5cf4355d3d1ef (patch) | |
tree | fccece19424d49db1c03ef8f204f3c7ca3478a4a /net/ipv4/tcp.c | |
parent | 869e7c62486ec0e170a9771acaa251d1a33b5871 (diff) |
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, | |||
695 | struct tcp_splice_state *tss = rd_desc->arg.data; | 695 | struct tcp_splice_state *tss = rd_desc->arg.data; |
696 | int ret; | 696 | int ret; |
697 | 697 | ||
698 | ret = skb_splice_bits(skb, offset, tss->pipe, min(rd_desc->count, len), | 698 | ret = skb_splice_bits(skb, skb->sk, offset, tss->pipe, |
699 | tss->flags); | 699 | min(rd_desc->count, len), tss->flags, |
700 | skb_socket_splice); | ||
700 | if (ret > 0) | 701 | if (ret > 0) |
701 | rd_desc->count -= ret; | 702 | rd_desc->count -= ret; |
702 | return ret; | 703 | return ret; |