Skip to content

Commit 6bf1be3

Browse files
sbashirochucklever
authored andcommitted
NFSD: Minor cleanup in layoutcommit decoding
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> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 274365a commit 6bf1be3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/nfsd/nfs4xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1802,7 +1802,7 @@ nfsd4_decode_layoutcommit(struct nfsd4_compoundargs *argp,
18021802
status = nfsd4_decode_stateid4(argp, &lcp->lc_sid);
18031803
if (status)
18041804
return status;
1805-
if (xdr_stream_decode_u32(argp->xdr, &lcp->lc_newoffset) < 0)
1805+
if (xdr_stream_decode_bool(argp->xdr, &lcp->lc_newoffset) < 0)
18061806
return nfserr_bad_xdr;
18071807
if (lcp->lc_newoffset) {
18081808
if (xdr_stream_decode_u64(argp->xdr, &lcp->lc_last_wr) < 0)

0 commit comments

Comments
 (0)