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

NFS: Update listxattr to use xdr_set_scratch_folio()

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

+4 -4
+2 -2
fs/nfs/nfs42proc.c
··· 1514 1514 1515 1515 1516 1516 ret = -ENOMEM; 1517 - res.scratch = alloc_page(GFP_KERNEL); 1517 + res.scratch = folio_alloc(GFP_KERNEL, 0); 1518 1518 if (!res.scratch) 1519 1519 goto out; 1520 1520 ··· 1552 1552 } 1553 1553 kfree(pages); 1554 1554 out_free_scratch: 1555 - __free_page(res.scratch); 1555 + folio_put(res.scratch); 1556 1556 out: 1557 1557 return ret; 1558 1558
+1 -1
fs/nfs/nfs42xdr.c
··· 1781 1781 struct compound_hdr hdr; 1782 1782 int status; 1783 1783 1784 - xdr_set_scratch_page(xdr, res->scratch); 1784 + xdr_set_scratch_folio(xdr, res->scratch); 1785 1785 1786 1786 status = decode_compound_hdr(xdr, &hdr); 1787 1787 if (status)
+1 -1
include/linux/nfs_xdr.h
··· 1596 1596 1597 1597 struct nfs42_listxattrsres { 1598 1598 struct nfs4_sequence_res seq_res; 1599 - struct page *scratch; 1599 + struct folio *scratch; 1600 1600 void *xattr_buf; 1601 1601 size_t xattr_len; 1602 1602 u64 cookie;