Skip to content

Commit

Permalink
SUNRPC: Fix up typo in xdr_init_decode()
Browse files Browse the repository at this point in the history
We already know that the head buffer and page are empty, so if there is
any data, it is in the tail.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
  • Loading branch information
Trond Myklebust committed Dec 2, 2020
1 parent 046e5cc commit 2b1f83d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p,
else if (buf->page_len != 0)
xdr_set_page_base(xdr, 0, buf->len);
else
xdr_set_iov(xdr, buf->head, buf->len);
xdr_set_iov(xdr, buf->tail, buf->len);
if (p != NULL && p > xdr->p && xdr->end >= p) {
xdr->nwords -= p - xdr->p;
xdr->p = p;
Expand Down

0 comments on commit 2b1f83d

Please sign in to comment.