diff options
| author | Anna Schumaker <anna.schumaker@oracle.com> | 2025-06-30 13:42:51 -0400 |
|---|---|---|
| committer | Anna Schumaker <anna.schumaker@oracle.com> | 2025-09-23 13:29:50 -0400 |
| commit | 4b7c3b4c673d40e4b98cdaf642495929f43787e6 (patch) | |
| tree | a9a943a366164235c060ca0aa8bd596cb6271c7f /fs/nfs/flexfilelayout/flexfilelayout.c | |
| parent | 1a33b629af21a98fc1c85da7cc21c78bd1eb1030 (diff) | |
NFS: Update the flexfilelayout driver to use xdr_set_scratch_folio()
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'fs/nfs/flexfilelayout/flexfilelayout.c')
| -rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayout.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c index 9edb5f9b0c4e..15658a0316bf 100644 --- a/fs/nfs/flexfilelayout/flexfilelayout.c +++ b/fs/nfs/flexfilelayout/flexfilelayout.c @@ -388,20 +388,20 @@ ff_layout_alloc_lseg(struct pnfs_layout_hdr *lh, struct nfs4_ff_layout_segment *fls = NULL; struct xdr_stream stream; struct xdr_buf buf; - struct page *scratch; + struct folio *scratch; u64 stripe_unit; u32 mirror_array_cnt; __be32 *p; int i, rc; dprintk("--> %s\n", __func__); - scratch = alloc_page(gfp_flags); + scratch = folio_alloc(gfp_flags, 0); if (!scratch) return ERR_PTR(-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); /* stripe unit and mirror_array_cnt */ rc = -EIO; @@ -564,7 +564,7 @@ out_sort_mirrors: ret = &fls->generic_hdr; dprintk("<-- %s (success)\n", __func__); out_free_page: - __free_page(scratch); + folio_put(scratch); return ret; out_err_free: _ff_layout_free_lseg(fls); |