summaryrefslogtreecommitdiff
path: root/net/rxrpc/recvmsg.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-09-30 13:26:03 +0100
committerDavid Howells <dhowells@redhat.com>2016-09-30 14:39:28 +0100
commit775e5b71db6aca47d49d43d08751f2e8ebad7f60 (patch)
tree54beb3163dd5d3184d55cf8c46ae60fed3cbb963 /net/rxrpc/recvmsg.c
parent0851115090a3eb9585d6a804a61e47f3d89ac2a8 (diff)
rxrpc: The offset field in struct rxrpc_skb_priv is unnecessary
The offset field in struct rxrpc_skb_priv is unnecessary as the value can always be calculated. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'net/rxrpc/recvmsg.c')
-rw-r--r--net/rxrpc/recvmsg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/rxrpc/recvmsg.c b/net/rxrpc/recvmsg.c
index 038ae62ddb4d..f05ea0a88076 100644
--- a/net/rxrpc/recvmsg.c
+++ b/net/rxrpc/recvmsg.c
@@ -261,15 +261,13 @@ static int rxrpc_locate_data(struct rxrpc_call *call, struct sk_buff *skb,
u8 *_annotation,
unsigned int *_offset, unsigned int *_len)
{
- struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
- unsigned int offset = *_offset;
+ unsigned int offset = sizeof(struct rxrpc_wire_header);
unsigned int len = *_len;
int ret;
u8 annotation = *_annotation;
/* Locate the subpacket */
- offset = sp->offset;
- len = skb->len - sp->offset;
+ len = skb->len - offset;
if ((annotation & RXRPC_RX_ANNO_JUMBO) > 0) {
offset += (((annotation & RXRPC_RX_ANNO_JUMBO) - 1) *
RXRPC_JUMBO_SUBPKTLEN);