Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10855870rwl; Mon, 2 Jan 2023 09:13:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXvE2TufDyxJIYnb5bpkPAB7UJfchVjjoiYZqUwDV6WorBgO/Zx00fxTiMjjAidD8xxoqEFj X-Received: by 2002:a17:902:e543:b0:189:a6b4:91ed with SMTP id n3-20020a170902e54300b00189a6b491edmr64015090plf.17.1672679615743; Mon, 02 Jan 2023 09:13:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672679615; cv=none; d=google.com; s=arc-20160816; b=ybkWbJt4wj/zNo2P1fc8aDDA+BAjqFIKK1fty3p5uqOIjqH7k+XP0LEhnzK8RJrFec F7P/5ahv4+ZWGoqMphQk79rFm8hO9tbrAEOA7zbAd17aRKReOyFPQEx1cJJofpwrhYcL NjiLlk5XILV3vFsm4yjLEphqZy5aLuf3B+p74q1/qBhJkfDf9ZJ/diYUYmUWEvj6Otcc kV081onHH41c+mOiZy1J0KZa4+Mh57JbmH6pwSRIiBGt5cR1wFgUQtSaDz3zAuoJVW+X kBFCHG0SMcOSPyMBh9ro0LKyjoZP9hlVSrEmbp8B/ps0RgsL/JNHHdo2xk7zNqwmAhGq Af0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:to:from:subject :dkim-signature; bh=EjY7L5TzuIEslswC8ApC9Q10TdV0bDIacQInApXS7Rg=; b=YWiOYi5oojhFSanQoaFFQ0kju6qdOgYOwe0oLUSvSCoKyCqfrWJ1F4LoAkDxiKRIGV GXt+2TsJGCgzj7lOr4suOZpn3vAOfhAxqrFSp83HfVaN9dO3sy5f+2fNAKQ/hbc/ej6+ xrmcZLKGHZ63Nhe/PZb7srCegO2p7epomCelMWjtAsVJJQbYBz7xzt1HBHO90mIeWDsG UEuq7PQbn+0sheodahLcjAnObwBr6N40IitOROw9XkI0SSzP6XqJIrPwfsP+Y9x9P/2I fcDl9ZgJBZ5MrFOo3SKzKX3TIpz3GhAytaBqrIQtRGaSVu+fDMC9GHour/tY/Vy9O+Bb bHpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SV742pAC; 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 p4-20020a170902e74400b00186f22a06absi32378413plf.253.2023.01.02.09.13.24; Mon, 02 Jan 2023 09:13:35 -0800 (PST) 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=SV742pAC; 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 S232151AbjABRHo (ORCPT + 99 others); Mon, 2 Jan 2023 12:07:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236409AbjABRHn (ORCPT ); Mon, 2 Jan 2023 12:07:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FE05BC07 for ; Mon, 2 Jan 2023 09:07:41 -0800 (PST) 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 2BF8A6104A for ; Mon, 2 Jan 2023 17:07:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7226EC433EF for ; Mon, 2 Jan 2023 17:07:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672679260; bh=OHI7TRP6rMXxItmY2Et8GmzZ5dWgzhR7EGu4B9SjHuI=; h=Subject:From:To:Date:In-Reply-To:References:From; b=SV742pACtWCBCxT4Yao3+gp6q2a7oEuY0JlOE8yJSIlZ6pX7UJRpIvYe4EKp0ZyRo ooEZmhVO5ec3vzc6ulp78RSuwtZIEI44jW9aOBfx1+9J1ET9O1URXRJxPrBGjW2ewh pYG3Z2JDIxxhXO+h39p7L0aYnf33Rvbuk/AxuCkPoeAdZfhmeR5/4YpIpL1HdD4CTp zQ+fPvVT/aJbWrq6+DkF6KVID2kbtGh5aiVGBnY5a7ORo3ek8omE8ZNz7AH6QiRZLD 2eb5RQxW+4Gr6JemeF3v4cjSP2Z4qWLQY0/iknqB8Hf87qvdjIe83VlWnLBHG8F0cB ALhEzIrbxgFbw== Subject: [PATCH v1 21/25] SUNRPC: Re-order construction of the first reply fields From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Mon, 02 Jan 2023 12:07:39 -0500 Message-ID: <167267925935.112521.11777990967352048147.stgit@manet.1015granger.net> In-Reply-To: <167267753484.112521.4826748148788735127.stgit@manet.1015granger.net> References: <167267753484.112521.4826748148788735127.stgit@manet.1015granger.net> User-Agent: StGit/1.5.dev2+g9ce680a5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 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 From: Chuck Lever Clean up: Group these together for legibility. Signed-off-by: Chuck Lever --- net/sunrpc/svc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index e4f8a177763e..e473c19b2f8d 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1248,19 +1248,15 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) __set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); __clear_bit(RQ_DROPME, &rqstp->rq_flags); + /* Construct the first words of the reply: */ svc_putu32(resv, rqstp->rq_xid); + svc_putnl(resv, RPC_REPLY); + reply_statp = resv->iov_base + resv->iov_len; vers = svc_getnl(argv); - - /* First words of reply: */ - svc_putnl(resv, 1); /* REPLY */ - if (vers != 2) /* RPC version number */ goto err_bad_rpc; - /* Save position in case we later decide to reject: */ - reply_statp = resv->iov_base + resv->iov_len; - svc_putnl(resv, 0); /* ACCEPT */ rqstp->rq_prog = prog = svc_getnl(argv); /* program number */