]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
NFSD: Clean up WRITE arg decoders
authorChuck Lever <chuck.lever@oracle.com>
Mon, 12 Sep 2022 21:23:07 +0000 (17:23 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Sep 2022 18:02:47 +0000 (14:02 -0400)
xdr_stream_subsegment() already returns a boolean value.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs3xdr.c
fs/nfsd/nfsxdr.c

index 71e32cf28885485be5c852f55d72eb68e17b69ce..3308dd671ef0b87a3016db8468ea33cd3aaaada8 100644 (file)
@@ -571,10 +571,8 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
                args->count = max_blocksize;
                args->len = max_blocksize;
        }
-       if (!xdr_stream_subsegment(xdr, &args->payload, args->count))
-               return false;
 
-       return true;
+       return xdr_stream_subsegment(xdr, &args->payload, args->count);
 }
 
 bool
index aba8520b4b8b6b18284586604f4231dd266c10d7..caf6355b18fa99769850d41ab88db0f8330848fb 100644 (file)
@@ -338,10 +338,8 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, struct xdr_stream *xdr)
                return false;
        if (args->len > NFSSVC_MAXBLKSIZE_V2)
                return false;
-       if (!xdr_stream_subsegment(xdr, &args->payload, args->len))
-               return false;
 
-       return true;
+       return xdr_stream_subsegment(xdr, &args->payload, args->len);
 }
 
 bool