Linux NFS development
 help / color / mirror / Atom feed
From: Chuck Lever <cel@kernel.org>
To: Chuck Lever <cel@kernel.org>, Christoph Hellwig <hch@lst.de>,
	 Jeff Layton <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
	 Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>,  Tom Talpey <tom@talpey.com>,
	Sergey Bashirov <sergeybashirov@gmail.com>,
	 Konstantin Evtushenko <koevtushenko@yandex.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 4/4] NFSD: Remove the svc_rqst argument from proc_layoutcommit
Date: Thu, 19 Nov 2026 13:33:54 -0500	[thread overview]
Message-ID: <20261119-blocklayout-decode-stream-v1-4-d71322f42c28@kernel.org> (raw)
In-Reply-To: <20261119-blocklayout-decode-stream-v1-0-d71322f42c28@kernel.org>

Commit f963cf2b91a3 ("NFSD: Implement large extent array support in
pNFS") added an svc_rqst argument to the proc_layoutcommit layout
operation so the block and SCSI layout drivers could decode the
layoutupdate4 body with rq_arg_stream. Those drivers decode from a
local xdr_stream, and no proc_layoutcommit implementation reads the
svc_rqst. Leaving the argument in place invites a layout driver to
borrow rq_arg again.

Remove the svc_rqst argument from the operation and from its three
implementations.

Signed-off-by: Chuck Lever <cel@kernel.org>
---
 fs/nfsd/blocklayout.c    | 8 ++++----
 fs/nfsd/flexfilelayout.c | 4 ++--
 fs/nfsd/nfs4proc.c       | 2 +-
 fs/nfsd/pnfs.h           | 3 +--
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/fs/nfsd/blocklayout.c b/fs/nfsd/blocklayout.c
index c3b614b25278..23f2365787eb 100644
--- a/fs/nfsd/blocklayout.c
+++ b/fs/nfsd/blocklayout.c
@@ -266,8 +266,8 @@ nfsd4_block_proc_getdeviceinfo(struct super_block *sb,
 }
 
 static __be32
-nfsd4_block_proc_layoutcommit(struct inode *inode, struct svc_rqst *rqstp,
-		struct nfsd4_layoutcommit *lcp)
+nfsd4_block_proc_layoutcommit(struct inode *inode,
+			      struct nfsd4_layoutcommit *lcp)
 {
 	__be32 scratch[XDR_QUADLEN(NFS4_DEVICEID4_SIZE)];
 	struct xdr_stream xdr;
@@ -461,8 +461,8 @@ nfsd4_scsi_proc_getdeviceinfo(struct super_block *sb,
 	return nfserrno(nfsd4_block_get_device_info_scsi(sb, clp, gdp));
 }
 static __be32
-nfsd4_scsi_proc_layoutcommit(struct inode *inode, struct svc_rqst *rqstp,
-		struct nfsd4_layoutcommit *lcp)
+nfsd4_scsi_proc_layoutcommit(struct inode *inode,
+			     struct nfsd4_layoutcommit *lcp)
 {
 	__be32 scratch[XDR_QUADLEN(NFS4_DEVICEID4_SIZE)];
 	struct xdr_stream xdr;
diff --git a/fs/nfsd/flexfilelayout.c b/fs/nfsd/flexfilelayout.c
index 0deb913493a3..c97caeec4024 100644
--- a/fs/nfsd/flexfilelayout.c
+++ b/fs/nfsd/flexfilelayout.c
@@ -130,8 +130,8 @@ nfsd4_ff_proc_getdeviceinfo(struct super_block *sb, struct svc_rqst *rqstp,
 }
 
 static __be32
-nfsd4_ff_proc_layoutcommit(struct inode *inode, struct svc_rqst *rqstp,
-		struct nfsd4_layoutcommit *lcp)
+nfsd4_ff_proc_layoutcommit(struct inode *inode,
+			   struct nfsd4_layoutcommit *lcp)
 {
 	return nfs_ok;
 }
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 71d6a473c1bc..2f25acb1ac92 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -3119,7 +3119,7 @@ nfsd4_layoutcommit(struct svc_rqst *rqstp,
 		mutex_unlock(&ls->ls_mutex);
 	}
 
-	nfserr = ops->proc_layoutcommit(inode, rqstp, lcp);
+	nfserr = ops->proc_layoutcommit(inode, lcp);
 
 	if (!lcp->lc_reclaim) {
 		nfsd4_file_mark_deleg_written(ls->ls_stid.sc_file);
diff --git a/fs/nfsd/pnfs.h b/fs/nfsd/pnfs.h
index e5f2e11c880a..a3d558ccdbdf 100644
--- a/fs/nfsd/pnfs.h
+++ b/fs/nfsd/pnfs.h
@@ -38,8 +38,7 @@ struct nfsd4_layout_ops {
 			const struct nfsd4_layoutget *lgp);
 
 	__be32 (*proc_layoutcommit)(struct inode *inode,
-			struct svc_rqst *rqstp,
-			struct nfsd4_layoutcommit *lcp);
+				    struct nfsd4_layoutcommit *lcp);
 
 	bool (*fence_client)(struct nfs4_layout_stateid *ls,
 			     struct nfsd_file *file);

-- 
2.56.0


      parent reply	other threads:[~2026-11-19 18:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 18:33 [PATCH 0/4] NFSD: More minor XDR restructuring Chuck Lever
2026-11-19 18:33 ` [PATCH 1/4] NFSD: Reject layoutupdate extent counts that wrap the length check Chuck Lever
2026-11-20 16:12   ` Christoph Hellwig
2026-11-19 18:33 ` [PATCH 2/4] NFSD: Allocate the layoutupdate extent array with kvzalloc_objs() Chuck Lever
2026-11-20 16:13   ` Christoph Hellwig
2026-11-19 18:33 ` [PATCH 3/4] NFSD: Decode block and SCSI layoutupdates from a local xdr_stream Chuck Lever
2026-11-20 16:14   ` Christoph Hellwig
2026-11-19 18:33 ` Chuck Lever [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=20261119-blocklayout-decode-stream-v1-4-d71322f42c28@kernel.org \
    --to=cel@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=hch@lst.de \
    --cc=jlayton@kernel.org \
    --cc=koevtushenko@yandex.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=sergeybashirov@gmail.com \
    --cc=tom@talpey.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