Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

SUNRPC: Update gssx_accept_sec_context() to use xdr_set_scratch_folio()

This was the last caller of xdr_set_scratch_page(), so I remove this
function while I'm at it.

Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>

+4 -17
-13
include/linux/sunrpc/xdr.h
··· 288 288 } 289 289 290 290 /** 291 - * xdr_set_scratch_page - Attach a scratch buffer for decoding data 292 - * @xdr: pointer to xdr_stream struct 293 - * @page: an anonymous page 294 - * 295 - * See xdr_set_scratch_buffer(). 296 - */ 297 - static inline void 298 - xdr_set_scratch_page(struct xdr_stream *xdr, struct page *page) 299 - { 300 - xdr_set_scratch_buffer(xdr, page_address(page), PAGE_SIZE); 301 - } 302 - 303 - /** 304 291 * xdr_set_scratch_folio - Attach a scratch buffer for decoding data 305 292 * @xdr: pointer to xdr_stream struct 306 293 * @page: an anonymous folio
+4 -4
net/sunrpc/auth_gss/gss_rpc_xdr.c
··· 794 794 struct gssx_res_accept_sec_context *res = data; 795 795 u32 value_follows; 796 796 int err; 797 - struct page *scratch; 797 + struct folio *scratch; 798 798 799 - scratch = alloc_page(GFP_KERNEL); 799 + scratch = folio_alloc(GFP_KERNEL, 0); 800 800 if (!scratch) 801 801 return -ENOMEM; 802 - xdr_set_scratch_page(xdr, scratch); 802 + xdr_set_scratch_folio(xdr, scratch); 803 803 804 804 /* res->status */ 805 805 err = gssx_dec_status(xdr, &res->status); ··· 844 844 err = gssx_dec_option_array(xdr, &res->options); 845 845 846 846 out_free: 847 - __free_page(scratch); 847 + folio_put(scratch); 848 848 return err; 849 849 }