From: Sergey Bashirov <sergeybashirov@gmail.com>
To: Chuck Lever <chuck.lever@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
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>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Konstantin Evtushenko <koevtushenko@yandex.com>,
Sergey Bashirov <sergeybashirov@gmail.com>
Subject: [PATCH v2 3/3] NFSD: Minor cleanup in layoutcommit decoding
Date: Tue, 15 Jul 2025 18:32:20 +0300 [thread overview]
Message-ID: <20250715153319.37428-4-sergeybashirov@gmail.com> (raw)
In-Reply-To: <20250715153319.37428-1-sergeybashirov@gmail.com>
Use the appropriate xdr function to decode the lc_newoffset field,
which is a boolean value. See RFC 8881, section 18.42.1.
Signed-off-by: Sergey Bashirov <sergeybashirov@gmail.com>
---
fs/nfsd/nfs4xdr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 6479c1e3b7741..ca9e3321b6691 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1813,7 +1813,7 @@ nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp,
status = nfsd4_decode_stateid4(argp, &lcp->lc_sid);
if (status)
return status;
- if (xdr_stream_decode_u32(argp->xdr, &lcp->lc_newoffset) < 0)
+ if (xdr_stream_decode_bool(argp->xdr, &lcp->lc_newoffset) < 0)
return nfserr_bad_xdr;
if (lcp->lc_newoffset) {
if (xdr_stream_decode_u64(argp->xdr, &lcp->lc_last_wr) < 0)
--
2.43.0
next prev parent reply other threads:[~2025-07-15 15:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 15:32 [PATCH v2 0/3] NFSD: Fix last write offset handling in layoutcommit Sergey Bashirov
2025-07-15 15:32 ` [PATCH v2 1/3] NFSD: Minor cleanup in layoutcommit processing Sergey Bashirov
2025-07-15 15:32 ` [PATCH v2 2/3] NFSD: Fix last write offset handling in layoutcommit Sergey Bashirov
2025-07-16 11:16 ` Christoph Hellwig
2025-07-15 15:32 ` Sergey Bashirov [this message]
2025-07-16 11:16 ` [PATCH v2 3/3] NFSD: Minor cleanup in layoutcommit decoding Christoph Hellwig
2025-07-15 16:11 ` [PATCH v2 0/3] NFSD: Fix last write offset handling in layoutcommit Chuck Lever
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=20250715153319.37428-4-sergeybashirov@gmail.com \
--to=sergeybashirov@gmail.com \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=hch@infradead.org \
--cc=jlayton@kernel.org \
--cc=koevtushenko@yandex.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.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