Skip to content

Commit 2f8416f

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

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

fs/nfs/nfs4proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6160,7 +6160,7 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf,
61606160
}
61616161

61626162
/* for decoding across pages */
6163-
res.acl_scratch = alloc_page(GFP_KERNEL);
6163+
res.acl_scratch = folio_alloc(GFP_KERNEL, 0);
61646164
if (!res.acl_scratch)
61656165
goto out_free;
61666166

@@ -6196,7 +6196,7 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf,
61966196
while (--i >= 0)
61976197
__free_page(pages[i]);
61986198
if (res.acl_scratch)
6199-
__free_page(res.acl_scratch);
6199+
folio_put(res.acl_scratch);
62006200
kfree(pages);
62016201
return ret;
62026202
}

fs/nfs/nfs4xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6585,7 +6585,7 @@ nfs4_xdr_dec_getacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
65856585
int status;
65866586

65876587
if (res->acl_scratch != NULL)
6588-
xdr_set_scratch_page(xdr, res->acl_scratch);
6588+
xdr_set_scratch_folio(xdr, res->acl_scratch);
65896589
status = decode_compound_hdr(xdr, &hdr);
65906590
if (status)
65916591
goto out;

include/linux/nfs_xdr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ struct nfs_getaclres {
862862
size_t acl_len;
863863
size_t acl_data_offset;
864864
int acl_flags;
865-
struct page * acl_scratch;
865+
struct folio * acl_scratch;
866866
};
867867

868868
struct nfs_setattrres {

0 commit comments

Comments
 (0)