Skip to content

Commit 670335c

Browse files
author
Anna Schumaker
committed
NFS: Update readdir to use a scratch folio
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
1 parent c8a1275 commit 670335c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

fs/nfs/dir.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,17 +829,17 @@ static int nfs_readdir_folio_filler(struct nfs_readdir_descriptor *desc,
829829
struct address_space *mapping = desc->file->f_mapping;
830830
struct folio *new, *folio = *arrays;
831831
struct xdr_stream stream;
832-
struct page *scratch;
832+
struct folio *scratch;
833833
struct xdr_buf buf;
834834
u64 cookie;
835835
int status;
836836

837-
scratch = alloc_page(GFP_KERNEL);
837+
scratch = folio_alloc(GFP_KERNEL, 0);
838838
if (scratch == NULL)
839839
return -ENOMEM;
840840

841841
xdr_init_decode_pages(&stream, &buf, xdr_pages, buflen);
842-
xdr_set_scratch_page(&stream, scratch);
842+
xdr_set_scratch_folio(&stream, scratch);
843843

844844
do {
845845
status = nfs_readdir_entry_decode(desc, entry, &stream);
@@ -891,7 +891,7 @@ static int nfs_readdir_folio_filler(struct nfs_readdir_descriptor *desc,
891891
if (folio != *arrays)
892892
nfs_readdir_folio_unlock_and_put(folio);
893893

894-
put_page(scratch);
894+
folio_put(scratch);
895895
return status;
896896
}
897897

0 commit comments

Comments
 (0)