]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFS: Update listxattr to use xdr_set_scratch_folio()
authorAnna Schumaker <anna.schumaker@oracle.com>
Mon, 30 Jun 2025 15:14:41 +0000 (11:14 -0400)
committerAnna Schumaker <anna.schumaker@oracle.com>
Tue, 23 Sep 2025 17:29:50 +0000 (13:29 -0400)
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/nfs42proc.c
fs/nfs/nfs42xdr.c
include/linux/nfs_xdr.h

index 6a0b5871ba3b090d7a1fc71d305dcb555435e72c..d537fb0c230e8b201a57dd8caa5a45967f6a2100 100644 (file)
@@ -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 @@ out_free_pages:
        }
        kfree(pages);
 out_free_scratch:
-       __free_page(res.scratch);
+       folio_put(res.scratch);
 out:
        return ret;
 
index 4cc915d5741d47627318ac01b2eb73d00d3b499a..e10d83ba835ef3f333a67f15d8c9d1d48ae7b2bd 100644 (file)
@@ -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)
index 7823d4574e296042e5edbfa2b71f99f38ec24da0..d56583572c98e08cb81a00eef0cb7dc4d60532d6 100644 (file)
@@ -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;