Commit e43ac22b authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: _copy_to/from_pages() now check for zero length

Clean up callers of _copy_to/from_pages() that still check for a zero
length.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 6707fbd7
...@@ -1665,7 +1665,6 @@ static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigne ...@@ -1665,7 +1665,6 @@ static void __read_bytes_from_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigne
len -= this_len; len -= this_len;
obj += this_len; obj += this_len;
this_len = min_t(unsigned int, len, subbuf->page_len); this_len = min_t(unsigned int, len, subbuf->page_len);
if (this_len)
_copy_from_pages(obj, subbuf->pages, subbuf->page_base, this_len); _copy_from_pages(obj, subbuf->pages, subbuf->page_base, this_len);
len -= this_len; len -= this_len;
obj += this_len; obj += this_len;
...@@ -1696,7 +1695,6 @@ static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned ...@@ -1696,7 +1695,6 @@ static void __write_bytes_to_xdr_buf(struct xdr_buf *subbuf, void *obj, unsigned
len -= this_len; len -= this_len;
obj += this_len; obj += this_len;
this_len = min_t(unsigned int, len, subbuf->page_len); this_len = min_t(unsigned int, len, subbuf->page_len);
if (this_len)
_copy_to_pages(subbuf->pages, subbuf->page_base, obj, this_len); _copy_to_pages(subbuf->pages, subbuf->page_base, obj, this_len);
len -= this_len; len -= this_len;
obj += this_len; obj += this_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