Linux NFS development
 help / color / mirror / Atom feed
From: Anna Schumaker <anna@kernel.org>
To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com
Cc: anna@kernel.org
Subject: [PATCH v1 9/9] SUNRPC: Update gssx_accept_sec_context() to use xdr_set_scratch_folio()
Date: Fri, 12 Sep 2025 17:14:10 -0400	[thread overview]
Message-ID: <20250912211410.837006-11-anna@kernel.org> (raw)
In-Reply-To: <20250912211410.837006-1-anna@kernel.org>

From: Anna Schumaker <anna.schumaker@oracle.com>

This was the last caller of xdr_set_scratch_page(), so I remove this
function while I'm at it.

Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
---
 include/linux/sunrpc/xdr.h        | 13 -------------
 net/sunrpc/auth_gss/gss_rpc_xdr.c |  8 ++++----
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 3ce17321689a..49278749ad0c 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -287,19 +287,6 @@ xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen)
 	xdr->scratch.iov_len = buflen;
 }
 
-/**
- * xdr_set_scratch_page - Attach a scratch buffer for decoding data
- * @xdr: pointer to xdr_stream struct
- * @page: an anonymous page
- *
- * See xdr_set_scratch_buffer().
- */
-static inline void
-xdr_set_scratch_page(struct xdr_stream *xdr, struct page *page)
-{
-	xdr_set_scratch_buffer(xdr, page_address(page), PAGE_SIZE);
-}
-
 /**
  * xdr_set_scratch_folio - Attach a scratch buffer for decoding data
  * @xdr: pointer to xdr_stream struct
diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
index cb32ab9a8395..7d2cdc2bd374 100644
--- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
+++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
@@ -794,12 +794,12 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
 	struct gssx_res_accept_sec_context *res = data;
 	u32 value_follows;
 	int err;
-	struct page *scratch;
+	struct folio *scratch;
 
-	scratch = alloc_page(GFP_KERNEL);
+	scratch = folio_alloc(GFP_KERNEL, 0);
 	if (!scratch)
 		return -ENOMEM;
-	xdr_set_scratch_page(xdr, scratch);
+	xdr_set_scratch_folio(xdr, scratch);
 
 	/* res->status */
 	err = gssx_dec_status(xdr, &res->status);
@@ -844,6 +844,6 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
 	err = gssx_dec_option_array(xdr, &res->options);
 
 out_free:
-	__free_page(scratch);
+	folio_put(scratch);
 	return err;
 }
-- 
2.51.0


      parent reply	other threads:[~2025-09-12 21:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-12 21:14 [PATCH v1 0/9] SUNRPC: Convert the scratch page into a scratch folio Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 1/9] sunrpc: Introduce xdr_set_scratch_folio() Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 1/9] SUNRPC: " Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 2/9] NFS: Update readdir to use a scratch folio Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 3/9] NFS: Update getacl to use xdr_set_scratch_folio() Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 4/9] NFS: Update listxattr " Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 5/9] NFS: Update the blocklayout " Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 6/9] NFS: Update the filelayout " Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 7/9] NFS: Update the flexfilelayout driver " Anna Schumaker
2025-09-12 21:14 ` [PATCH v1 8/9] SUNRPC: Update svcxdr_init_decode() to call xdr_set_scratch_folio() Anna Schumaker
2025-09-12 21:14 ` Anna Schumaker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250912211410.837006-11-anna@kernel.org \
    --to=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox