diff options
Diffstat (limited to 'include/linux/sunrpc/xdr.h')
-rw-r--r-- | include/linux/sunrpc/xdr.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 8a9ec617cf66..152597750f55 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -288,16 +288,16 @@ xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen) } /** - * xdr_set_scratch_page - Attach a scratch buffer for decoding data + * xdr_set_scratch_folio - Attach a scratch buffer for decoding data * @xdr: pointer to xdr_stream struct - * @page: an anonymous page + * @page: an anonymous folio * * See xdr_set_scratch_buffer(). */ static inline void -xdr_set_scratch_page(struct xdr_stream *xdr, struct page *page) +xdr_set_scratch_folio(struct xdr_stream *xdr, struct folio *folio) { - xdr_set_scratch_buffer(xdr, page_address(page), PAGE_SIZE); + xdr_set_scratch_buffer(xdr, folio_address(folio), folio_size(folio)); } /** @@ -721,7 +721,7 @@ xdr_stream_decode_u64(struct xdr_stream *xdr, __u64 *ptr) * @len: size of buffer pointed to by @ptr * * Return values: - * On success, returns size of object stored in @ptr + * %0 on success * %-EBADMSG on XDR buffer overflow */ static inline ssize_t @@ -732,7 +732,7 @@ xdr_stream_decode_opaque_fixed(struct xdr_stream *xdr, void *ptr, size_t len) if (unlikely(!p)) return -EBADMSG; xdr_decode_opaque_fixed(p, ptr, len); - return len; + return 0; } /** |