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>
This commit is contained in:

committed by
David S. Miller

parent
869e7c6248
commit
a60e3cc7c9
@@ -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;
|
||||
|
Reference in New Issue
Block a user