summaryrefslogtreecommitdiff
path: root/fs/nfs/filelayout/filelayout.c
diff options
context:
space:
mode:
authorAnna Schumaker <anna.schumaker@oracle.com>2025-06-30 20:19:26 +0300
committerAnna Schumaker <anna.schumaker@oracle.com>2025-09-23 20:29:50 +0300
commit1a33b629af21a98fc1c85da7cc21c78bd1eb1030 (patch)
tree3cdba3b582ccbd0f5ffcec8a1b8a34a612c04774 /fs/nfs/filelayout/filelayout.c
parentcf289099ab8a1f4369415ea6c8fb4c39ab2173ca (diff)
downloadlinux-1a33b629af21a98fc1c85da7cc21c78bd1eb1030.tar.xz
NFS: Update the filelayout to use xdr_set_scratch_folio()
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'fs/nfs/filelayout/filelayout.c')
-rw-r--r--fs/nfs/filelayout/filelayout.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfs/filelayout/filelayout.c b/fs/nfs/filelayout/filelayout.c
index d39a1f58e18d..5c4551117c58 100644
--- a/fs/nfs/filelayout/filelayout.c
+++ b/fs/nfs/filelayout/filelayout.c
@@ -646,19 +646,19 @@ filelayout_decode_layout(struct pnfs_layout_hdr *flo,
{
struct xdr_stream stream;
struct xdr_buf buf;
- struct page *scratch;
+ struct folio *scratch;
__be32 *p;
uint32_t nfl_util;
int i;
dprintk("%s: set_layout_map Begin\n", __func__);
- scratch = alloc_page(gfp_flags);
+ scratch = folio_alloc(gfp_flags, 0);
if (!scratch)
return -ENOMEM;
xdr_init_decode_pages(&stream, &buf, lgr->layoutp->pages, lgr->layoutp->len);
- xdr_set_scratch_page(&stream, scratch);
+ xdr_set_scratch_folio(&stream, scratch);
/* 20 = ufl_util (4), first_stripe_index (4), pattern_offset (8),
* num_fh (4) */
@@ -724,11 +724,11 @@ filelayout_decode_layout(struct pnfs_layout_hdr *flo,
fl->fh_array[i]->size);
}
- __free_page(scratch);
+ folio_put(scratch);
return 0;
out_err:
- __free_page(scratch);
+ folio_put(scratch);
return -EIO;
}