Commit eee1f549 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Fix open coded xdr_stream_remaining()

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 0279024f
...@@ -1261,7 +1261,7 @@ uint64_t xdr_align_data(struct xdr_stream *xdr, uint64_t offset, uint32_t length ...@@ -1261,7 +1261,7 @@ uint64_t xdr_align_data(struct xdr_stream *xdr, uint64_t offset, uint32_t length
xdr_realign_pages(xdr); xdr_realign_pages(xdr);
from = xdr_page_pos(xdr); from = xdr_page_pos(xdr);
bytes = xdr->nwords << 2; bytes = xdr_stream_remaining(xdr);
if (length < bytes) if (length < bytes)
bytes = length; bytes = length;
...@@ -1298,7 +1298,7 @@ uint64_t xdr_expand_hole(struct xdr_stream *xdr, uint64_t offset, uint64_t lengt ...@@ -1298,7 +1298,7 @@ uint64_t xdr_expand_hole(struct xdr_stream *xdr, uint64_t offset, uint64_t lengt
xdr_realign_pages(xdr); xdr_realign_pages(xdr);
from = xdr_page_pos(xdr); from = xdr_page_pos(xdr);
bytes = xdr->nwords << 2; bytes = xdr_stream_remaining(xdr);
if (offset + length + bytes > buf->page_len) { if (offset + length + bytes > buf->page_len) {
unsigned int shift = (offset + length + bytes) - buf->page_len; unsigned int shift = (offset + length + bytes) - buf->page_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