Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3163420rwe; Mon, 29 Aug 2022 06:57:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR7fx5QFLJ2058DHa9UjAD4DR0+Hq83sgwIePSxJ8SHqFa0smI9XGCGJmaSj+L1hoz4Ne+Th X-Received: by 2002:a05:6a00:1705:b0:52f:6028:5c33 with SMTP id h5-20020a056a00170500b0052f60285c33mr16652560pfc.29.1661781476205; Mon, 29 Aug 2022 06:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661781476; cv=none; d=google.com; s=arc-20160816; b=MhAO8yXCEkfhcrWflNQh20iuc8+8EhIvx7r56qsqHMOXA1Vkib9Y3ZYMGMNeQjt86v fy6C8VrOigaunHvtT8A1YXB0n9bj1RYHGn2WgTS+U5dBzqFQjZWHxbQWKzDkBkH5veT7 zDDAVpXZv1SY+HKJyBaZshgqVF0KNMc5YGxEpHvOJmC634XJsSi7aVtro98d+1VDwkwV O7BkCPQj5GwDVHzoxw3eBvjK2Ex/typ4IuTvBZPsjIMsM0K3x8O7k0CEwGVP0tfhykiI ol1O1DWpeoEUmOGUTFF4GpcaN6C6qK7+WZ7rj0WB1qOd2FvE1h0HI41s/rnL7sku83yi KUnQ== 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=esS14170kne+qcQXD80xJyNI/gsbR5tAkbhSB9X+U7M=; b=w+nG7nm/4Z2Kv/ABLaP1xAIOSuHWOV19ACrgQEuIzcCrgIN9XFKp2hganBaIymfU4A PO5Trj4BmybxTGyVhcjBM1HT2bbZrWp0dtMtHrpQtVXl6LtqePtXqcehanFiYU1CrdZR DyaafSDtPt7kX3IHSNK0eZip3Nu3VMSc2/pn4QfjN9jxTAqVwBf3nbmnzFQIDX10C6v4 PqIA3rO1bb2VTRrHwQpeCHYialISLicQaKAd8vg7Q3s2YkxBx21wIHH9WwI/Jio1aBsO FXBHcQKszyjwFR5zDwWX0AvoCA/Di8Y5ImlbXJ9J52OkKBnHLNHnmmoZThoQ2oRSZW/U 8eCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PBnQY725; 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 a10-20020a63e40a000000b00429e6ef0e86si9143241pgi.603.2022.08.29.06.57.43; Mon, 29 Aug 2022 06:57:56 -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=PBnQY725; 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 S229645AbiH2NuV (ORCPT + 99 others); Mon, 29 Aug 2022 09:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbiH2NuV (ORCPT ); Mon, 29 Aug 2022 09:50:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8AC148EA5 for ; Mon, 29 Aug 2022 06:50:16 -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 ams.source.kernel.org (Postfix) with ESMTPS id 6CC37B81063 for ; Mon, 29 Aug 2022 13:50:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5E4DC433C1; Mon, 29 Aug 2022 13:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661781014; bh=qs5xYyzN50TajHHwxGpwnEiIRgnD5vefae0gI/dUjpQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=PBnQY725RjD8h6SulOWsFqp2hIp4cwoN+aGs7kuQEoSkivGy/lvKYZoqi6ubweDFR joUIMwU7CogFtf6az12oiQHpM8UVD06OtcWvWXOyaD2ikBYUgAu5ELNwdvrjOXV5Xo 55YBfbZTc9999MC0ef+/3wke/XDecFlYdcRPjMHk1fF+/Lunnt08kc54a00uvCwjPi yh7xssCkey6NHmm47nVcxMtKRrBo8guHZ8khhlD6QkfqlUoflaZpjPUUSRUaKXEB+i KvT+Fvere5D9PKzfy636ycVlQrPI9HNK521TyKT/YACByNieQ5XHtVIsX0oCXQhr2m cUGTmLB0nt88g== Message-ID: Subject: Re: [PATCH v2 7/7] NFSD: Clean up nfs4svc_encode_compoundres() From: Jeff Layton To: Chuck Lever , linux-nfs@vger.kernel.org Date: Mon, 29 Aug 2022 09:50:12 -0400 In-Reply-To: <166171266025.21449.2692376100575745686.stgit@manet.1015granger.net> References: <166171174172.21449.5036120183381273656.stgit@manet.1015granger.net> <166171266025.21449.2692376100575745686.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:51 -0400, Chuck Lever wrote: > In today's Linux NFS server implementation, the NFS dispatcher > initializes each XDR result stream, and the NFSv4 .pc_func and > .pc_encode methods all use xdr_stream-based encoding. This keeps > rq_res.len automatically updated. There is no longer a need for > the WARN_ON_ONCE() check in nfs4svc_encode_compoundres(). >=20 > Signed-off-by: Chuck Lever > --- > fs/nfsd/nfs4xdr.c | 4 ---- > 1 file changed, 4 deletions(-) >=20 > diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c > index 1e9690a061ec..af51e2a8ceb7 100644 > --- a/fs/nfsd/nfs4xdr.c > +++ b/fs/nfsd/nfs4xdr.c > @@ -5423,12 +5423,8 @@ bool > nfs4svc_encode_compoundres(struct svc_rqst *rqstp, struct xdr_stream *xd= r) > { > struct nfsd4_compoundres *resp =3D rqstp->rq_resp; > - struct xdr_buf *buf =3D xdr->buf; > __be32 *p; > =20 > - WARN_ON_ONCE(buf->len !=3D buf->head[0].iov_len + buf->page_len + > - buf->tail[0].iov_len); > - > /* > * Send buffer space for the following items is reserved > * at the top of nfsd4_proc_compound(). >=20 >=20 Reviewed-by: Jeff Layton