Skip to content

Commit c9cefd7

Browse files
author
Anna Schumaker
committed
NFS: Update listxattr to use xdr_set_scratch_folio()
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
1 parent 2f8416f commit c9cefd7

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

fs/nfs/nfs42proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ static ssize_t _nfs42_proc_listxattrs(struct inode *inode, void *buf,
15141514

15151515

15161516
ret = -ENOMEM;
1517-
res.scratch = alloc_page(GFP_KERNEL);
1517+
res.scratch = folio_alloc(GFP_KERNEL, 0);
15181518
if (!res.scratch)
15191519
goto out;
15201520

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

fs/nfs/nfs42xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1781,7 +1781,7 @@ static int nfs4_xdr_dec_listxattrs(struct rpc_rqst *rqstp,
17811781
struct compound_hdr hdr;
17821782
int status;
17831783

1784-
xdr_set_scratch_page(xdr, res->scratch);
1784+
xdr_set_scratch_folio(xdr, res->scratch);
17851785

17861786
status = decode_compound_hdr(xdr, &hdr);
17871787
if (status)

include/linux/nfs_xdr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ struct nfs42_listxattrsargs {
15961596

15971597
struct nfs42_listxattrsres {
15981598
struct nfs4_sequence_res seq_res;
1599-
struct page *scratch;
1599+
struct folio *scratch;
16001600
void *xattr_buf;
16011601
size_t xattr_len;
16021602
u64 cookie;

0 commit comments

Comments
 (0)