projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0279024
)
SUNRPC: Fix open coded xdr_stream_remaining()
author
Trond Myklebust
<trond.myklebust@hammerspace.com>
Sun, 22 Nov 2020 02:39:02 +0000
(21:39 -0500)
committer
Trond Myklebust
<trond.myklebust@hammerspace.com>
Wed, 2 Dec 2020 19:05:54 +0000
(14:05 -0500)
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xdr.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/xdr.c
b/net/sunrpc/xdr.c
index ddd5cc2281ab518d1750fe473e939058b1048ea0..c852d199c789e46c6551991cf64fc92476c4b6dc 100644
(file)
--- 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;