Message ID | 20201208202925.597663-3-Anna.Schumaker@Netapp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fixes for READ_PLUS | expand |
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index 5b848fe65c81..68f470e33427 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -1273,6 +1273,8 @@ uint64_t xdr_align_data(struct xdr_stream *xdr, uint64_t offset, uint32_t length bytes = xdr->nwords << 2; if (length < bytes) bytes = length; + if (bytes < length) + length = bytes; /* Move page data to the left */ if (from > offset) {