Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3163917rwe; Mon, 29 Aug 2022 06:58:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR7vk2sX/yLhsXx7KQi1xRchENvLc6hknqy9RI5Y8hSJoukTLD4YzqGNVUujlTpSQqzPAbLx X-Received: by 2002:a17:90b:4c52:b0:1f5:5129:af1a with SMTP id np18-20020a17090b4c5200b001f55129af1amr18328659pjb.202.1661781509700; Mon, 29 Aug 2022 06:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661781509; cv=none; d=google.com; s=arc-20160816; b=T07IxvvauqnQBAtqRGvVUVVhM4bYW1LYpzoyL4wZ2QLJgAEndsd0rwi9hrV2WhEulI EbHFOQaAm6VdfeKFNOk1rMQybXitX0tNAsl0SCwywfzAL3IZGtEZ8QL9OMSZ5/nhqHEq FhgniovRFt+ljUlCpUSIJKIeZwoGqEajjpWSEnyy/ZALO/0ZnsUeVq/ytHxw20eJxd8k VHwn1L5OzddPmxKzc9yOlpDkUdwgJZqhGSBXDWKH7L0dEisPr0gw2ylM7CeAQZHkjjar cprVVP/h9DYFmIZSSRcr4/p1vPtkdVoDfHM1ac9vf7QXRTQcK7Wqeb0D8iLsNs13atah Y6dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:dkim-signature; bh=Z2vSMdihpIfDTiGWwkNO3pm0oE6SlKk0my6FnOKBij0=; b=NsraJ/MG3QIGrnwRigb/rvtXIltoT+w50SahGqNp7l10QzRCoi4ap/RGndUoNAc9Hh pDIO/s0/RGArGHRwpjnMVOZT7NY2YOiZJImHtCTn/Ee7A206tzn16c7FHb1QkFFSzmYC XVklLZg+qyOXbSCGoQ/Nl2MpdT3zlvIM4COO4CMnfoT8AX6U2BixNlwBGDWBwIgecFZy odyuS/xK+tzdCZXlqcBw3d10hLJfPl7HGgOudWRaY+3NTpK/0drTCay04kCMrlBfHNMY 0+v2eIQjQMHvti54mV9sUWa/oAJLFxnao+L65djp6r6ksOvR3FyNoVuyHoIaZO+CGqlV PVZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d1rhqOe6; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a656bd3000000b0042b0c194308si9511076pgw.714.2022.08.29.06.58.16; Mon, 29 Aug 2022 06:58:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d1rhqOe6; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230332AbiH2NtT (ORCPT + 99 others); Mon, 29 Aug 2022 09:49:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230343AbiH2NtQ (ORCPT ); Mon, 29 Aug 2022 09:49:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 972CD96741 for ; Mon, 29 Aug 2022 06:49:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E4CAA60DBF for ; Mon, 29 Aug 2022 13:49:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14BF5C433C1; Mon, 29 Aug 2022 13:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661780954; bh=i/BhSomZ4QjRi6LppWHNJsWYtHQdrTGqKk3m38t/shs=; h=Subject:From:To:Date:In-Reply-To:References:From; b=d1rhqOe6Q4gxV3J+1PZchKFRkfJ0ZmUnczQoQ8P9CMkfKg/5/JnbpQpFC9SdSu1vq 7ZAwiX4xyhap9D4t7yAA97P2ba39Fa5qlsM+1577qM38P8Dd8csQQhHRCz17MF2gaS t4Toq7ElACJqMkZOXq/wJDTAuZd2d99JIQjPpbMO6kI6RwNA2Ii7jgyvN6dg9/gHt+ /GhWvOdJvIxQ2p+M80qcBdwOGSVISTz2SQaitIAe1WLlhK3YkDllcVXJk1vhZLKG7e ZPpxRoLmu4zoqOV7if8uLI2aK9h1DE+c6HV82sTSifOPjymhKtffxyQYP+R2mC0Bff JwLkUNG1f2HHA== Message-ID: Subject: Re: [PATCH v2 5/7] NFSD: Clean up WRITE arg decoders From: Jeff Layton To: Chuck Lever , linux-nfs@vger.kernel.org Date: Mon, 29 Aug 2022 09:49:12 -0400 In-Reply-To: <166171264742.21449.12798598095676580927.stgit@manet.1015granger.net> References: <166171174172.21449.5036120183381273656.stgit@manet.1015granger.net> <166171264742.21449.12798598095676580927.stgit@manet.1015granger.net> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sun, 2022-08-28 at 14:50 -0400, Chuck Lever wrote: > xdr_stream_subsegment() already returns a boolean value. >=20 > Signed-off-by: Chuck Lever > --- > fs/nfsd/nfs3xdr.c | 4 +--- > fs/nfsd/nfsxdr.c | 4 +--- > 2 files changed, 2 insertions(+), 6 deletions(-) >=20 > diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c > index 71e32cf28885..3308dd671ef0 100644 > --- a/fs/nfsd/nfs3xdr.c > +++ b/fs/nfsd/nfs3xdr.c > @@ -571,10 +571,8 @@ nfs3svc_decode_writeargs(struct svc_rqst *rqstp, str= uct xdr_stream *xdr) > args->count =3D max_blocksize; > args->len =3D max_blocksize; > } > - if (!xdr_stream_subsegment(xdr, &args->payload, args->count)) > - return false; > =20 > - return true; > + return xdr_stream_subsegment(xdr, &args->payload, args->count); > } > =20 > bool > diff --git a/fs/nfsd/nfsxdr.c b/fs/nfsd/nfsxdr.c > index aba8520b4b8b..caf6355b18fa 100644 > --- a/fs/nfsd/nfsxdr.c > +++ b/fs/nfsd/nfsxdr.c > @@ -338,10 +338,8 @@ nfssvc_decode_writeargs(struct svc_rqst *rqstp, stru= ct xdr_stream *xdr) > return false; > if (args->len > NFSSVC_MAXBLKSIZE_V2) > return false; > - if (!xdr_stream_subsegment(xdr, &args->payload, args->len)) > - return false; > =20 > - return true; > + return xdr_stream_subsegment(xdr, &args->payload, args->len); > } > =20 > bool >=20 >=20 Reviewed-by: Jeff Layton