Commit 4b22457c authored by David Howells's avatar David Howells

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: default avatarDavid Howells <dhowells@redhat.com>
parent fabf9201
...@@ -240,9 +240,6 @@ static int rxrpc_locate_data(struct rxrpc_call *call, struct sk_buff *skb, ...@@ -240,9 +240,6 @@ static int rxrpc_locate_data(struct rxrpc_call *call, struct sk_buff *skb,
int ret; int ret;
u8 annotation = *_annotation; u8 annotation = *_annotation;
if (offset > 0)
return 0;
/* Locate the subpacket */ /* Locate the subpacket */
offset = sp->offset; offset = sp->offset;
len = skb->len - sp->offset; len = skb->len - sp->offset;
...@@ -303,7 +300,9 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call, ...@@ -303,7 +300,9 @@ static int rxrpc_recvmsg_data(struct socket *sock, struct rxrpc_call *call,
if (msg) if (msg)
sock_recv_timestamp(msg, sock->sk, skb); sock_recv_timestamp(msg, sock->sk, skb);
ret = rxrpc_locate_data(call, skb, &call->rxtx_annotations[ix], if (rx_pkt_offset == 0)
ret = rxrpc_locate_data(call, skb,
&call->rxtx_annotations[ix],
&rx_pkt_offset, &rx_pkt_len); &rx_pkt_offset, &rx_pkt_len);
_debug("recvmsg %x DATA #%u { %d, %d }", _debug("recvmsg %x DATA #%u { %d, %d }",
sp->hdr.callNumber, seq, rx_pkt_offset, rx_pkt_len); sp->hdr.callNumber, seq, rx_pkt_offset, rx_pkt_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment