Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Anna Schumaker <anna.schumaker@oracle.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6.y 5/7] SUNRPC: Introduce xdr_set_scratch_folio()
Date: Tue,  8 Sep 2026 18:36:48 -0400	[thread overview]
Message-ID: <20260908223651.501880-5-sashal@kernel.org> (raw)
In-Reply-To: <20260908223651.501880-1-sashal@kernel.org>

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

[ Upstream commit c8a127596edc026e5364a7a609986dcd3999914c ]

This will replace xdr_set_scratch_page() when we switch pages to folios.

Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Stable-dep-of: c479bde671cb ("sunrpc: defer rq_argp and rq_resp free until after RCU grace period")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 include/linux/sunrpc/xdr.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index a180482dc209b..36a974baa101b 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -317,6 +317,19 @@ 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
+ * @page: an anonymous folio
+ *
+ * See xdr_set_scratch_buffer().
+ */
+static inline void
+xdr_set_scratch_folio(struct xdr_stream *xdr, struct folio *folio)
+{
+	xdr_set_scratch_buffer(xdr, folio_address(folio), folio_size(folio));
+}
+
 /**
  * xdr_reset_scratch_buffer - Clear scratch buffer information
  * @xdr: pointer to xdr_stream struct
-- 
2.53.0


  parent reply	other threads:[~2026-09-08 22:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 14:06 FAILED: patch "[PATCH] sunrpc: defer rq_argp and rq_resp free until after RCU grace" failed to apply to 6.6-stable tree gregkh
2026-09-08 22:36 ` [PATCH 6.6.y 1/7] SUNRPC: move all of xprt handling into svc_xprt_handle() Sasha Levin
2026-09-08 22:36   ` [PATCH 6.6.y 2/7] SUNRPC: Add a server-side API for retrieving an RPC's pseudoflavor Sasha Levin
2026-09-08 22:36   ` [PATCH 6.6.y 3/7] sunrpc: refactor pool_mode setting code Sasha Levin
2026-09-08 22:36   ` [PATCH 6.6.y 4/7] SUNRPC: make various functions static, or not exported Sasha Levin
2026-09-08 22:36   ` Sasha Levin [this message]
2026-09-08 22:36   ` [PATCH 6.6.y 6/7] SUNRPC: Update svcxdr_init_decode() to call xdr_set_scratch_folio() Sasha Levin
2026-09-08 22:36   ` [PATCH 6.6.y 7/7] sunrpc: defer rq_argp and rq_resp free until after RCU grace period Sasha Levin
2026-09-08 22:37 ` [PATCH 6.6.y 1/4] SUNRPC: move all of xprt handling into svc_xprt_handle() Sasha Levin
2026-09-08 22:37   ` [PATCH 6.6.y 2/4] SUNRPC: Add a server-side API for retrieving an RPC's pseudoflavor Sasha Levin
2026-09-08 22:37   ` [PATCH 6.6.y 3/4] sunrpc: refactor pool_mode setting code Sasha Levin
2026-09-08 22:37   ` [PATCH 6.6.y 4/4] sunrpc: defer rq_argp and rq_resp free until after RCU grace period Sasha Levin

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=20260908223651.501880-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=anna.schumaker@oracle.com \
    --cc=stable@vger.kernel.org \
    /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