mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
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>
This commit is contained in:
parent
040058a8f7
commit
c8a127596e
|
|
@ -300,6 +300,19 @@ xdr_set_scratch_page(struct xdr_stream *xdr, struct page *page)
|
|||
xdr_set_scratch_buffer(xdr, page_address(page), PAGE_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user