summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2020-11-22 03:39:02 +0100
committerTrond Myklebust <trond.myklebust@hammerspace.com>2020-12-02 20:05:54 +0100
commiteee1f54964fe868da425fe52a03666377335de01 (patch)
tree8e46012938f99bccb0ff3042cd38249d0ff0313c /net/sunrpc
parentSUNRPC: Fix up xdr_set_page() (diff)
downloadlinux-eee1f54964fe868da425fe52a03666377335de01.tar.xz
linux-eee1f54964fe868da425fe52a03666377335de01.zip
SUNRPC: Fix open coded xdr_stream_remaining()
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xdr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index ddd5cc2281ab..c852d199c789 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -1261,7 +1261,7 @@ uint64_t xdr_align_data(struct xdr_stream *xdr, uint64_t offset, uint32_t length
xdr_realign_pages(xdr);
from = xdr_page_pos(xdr);
- bytes = xdr->nwords << 2;
+ bytes = xdr_stream_remaining(xdr);
if (length < bytes)
bytes = length;
@@ -1298,7 +1298,7 @@ uint64_t xdr_expand_hole(struct xdr_stream *xdr, uint64_t offset, uint64_t lengt
xdr_realign_pages(xdr);
from = xdr_page_pos(xdr);
- bytes = xdr->nwords << 2;
+ bytes = xdr_stream_remaining(xdr);
if (offset + length + bytes > buf->page_len) {
unsigned int shift = (offset + length + bytes) - buf->page_len;