diff options
| author | Anna Schumaker <anna.schumaker@oracle.com> | 2025-06-30 17:04:54 +0300 |
|---|---|---|
| committer | Anna Schumaker <anna.schumaker@oracle.com> | 2025-09-23 20:29:50 +0300 |
| commit | c8a127596edc026e5364a7a609986dcd3999914c (patch) | |
| tree | 0f4162e5019749fd154accd84f7d4d70bf72b4a5 /include/linux/sunrpc | |
| parent | 040058a8f7fd333d4159a09ae308145a393c8551 (diff) | |
| download | linux-c8a127596edc026e5364a7a609986dcd3999914c.tar.xz | |
SUNRPC: Introduce xdr_set_scratch_folio()
This will replace xdr_set_scratch_page() when we switch pages to folios.
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/xdr.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 8a9ec617cf66..3ce17321689a 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h @@ -301,6 +301,19 @@ xdr_set_scratch_page(struct xdr_stream *xdr, struct page *page) } /** + * xdr_set_scratch_folio - Attach a scratch buffer for decoding data + * @xdr: pointer to xdr_stream struct + * @page: an anonymous folio + * + * See xdr_set_scratch_buffer(). + */ +static inline void +xdr_set_scratch_folio(struct xdr_stream *xdr, struct folio *folio) +{ + xdr_set_scratch_buffer(xdr, folio_address(folio), folio_size(folio)); +} + +/** * xdr_reset_scratch_buffer - Clear scratch buffer information * @xdr: pointer to xdr_stream struct * |
