diff options
author | David Howells <dhowells@redhat.com> | 2016-09-17 10:49:11 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-17 10:50:48 +0100 |
commit | 4b22457c06a3a950e14938c486283ad0f308c13d (patch) | |
tree | 82dca438a7cf5c9485781bea08e0935198e5e31a /net/rxrpc | |
parent | fabf9201806255d70386d8bc9f6a2942c0940da2 (diff) | |
download | linux-rpi-4b22457c06a3a950e14938c486283ad0f308c13d.tar.gz linux-rpi-4b22457c06a3a950e14938c486283ad0f308c13d.tar.bz2 linux-rpi-4b22457c06a3a950e14938c486283ad0f308c13d.zip |
rxrpc: Move the check of rx_pkt_offset from rxrpc_locate_data() to caller
Move the check of rx_pkt_offset from rxrpc_locate_data() to the caller,
rxrpc_recvmsg_data(), so that it's more clear what's going on there.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/recvmsg.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c index a284205b8ecf..0d085f5cf1bf 100644 --- a/net/rxrpc/recvmsg.c +++ b/net/rxrpc/recvmsg.c @@ -240,9 +240,6 @@ static int rxrpc_locate_data(struct rxrpc_call *call, struct sk_buff *skb, int ret; u8 annotation = *_annotation; - if (offset > 0) - return 0; - /* Locate the subpacket */ offset = sp->offset; len = skb->len - sp->offset; @@ -303,8 +300,10 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call, if (msg) sock_recv_timestamp(msg, sock->sk, skb); - ret = rxrpc_locate_data(call, skb, &call->rxtx_annotations[ix], - &rx_pkt_offset, &rx_pkt_len); + if (rx_pkt_offset == 0) + ret = rxrpc_locate_data(call, skb, + &call->rxtx_annotations[ix], + &rx_pkt_offset, &rx_pkt_len); _debug("recvmsg %x DATA #%u { %d, %d }", sp->hdr.callNumber, seq, rx_pkt_offset, rx_pkt_len); |