Commit c9cefd7a authored by Anna Schumaker's avatar Anna Schumaker
Browse files

NFS: Update listxattr to use xdr_set_scratch_folio()

parent 2f8416f2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1514,7 +1514,7 @@ static ssize_t _nfs42_proc_listxattrs(struct inode *inode, void *buf,


	ret = -ENOMEM;
	res.scratch = alloc_page(GFP_KERNEL);
	res.scratch = folio_alloc(GFP_KERNEL, 0);
	if (!res.scratch)
		goto out;

@@ -1552,7 +1552,7 @@ static ssize_t _nfs42_proc_listxattrs(struct inode *inode, void *buf,
	}
	kfree(pages);
out_free_scratch:
	__free_page(res.scratch);
	folio_put(res.scratch);
out:
	return ret;

+1 −1
Original line number Diff line number Diff line
@@ -1781,7 +1781,7 @@ static int nfs4_xdr_dec_listxattrs(struct rpc_rqst *rqstp,
	struct compound_hdr hdr;
	int status;

	xdr_set_scratch_page(xdr, res->scratch);
	xdr_set_scratch_folio(xdr, res->scratch);

	status = decode_compound_hdr(xdr, &hdr);
	if (status)
+1 −1
Original line number Diff line number Diff line
@@ -1596,7 +1596,7 @@ struct nfs42_listxattrsargs {

struct nfs42_listxattrsres {
	struct nfs4_sequence_res	seq_res;
	struct page			*scratch;
	struct folio			*scratch;
	void				*xattr_buf;
	size_t				xattr_len;
	u64				cookie;