Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5110046rwl; Sun, 8 Jan 2023 08:44:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXuTYbork6AE5r02r5rDTDUo1kPJ46P1PhQr3IO9SynGuBkVqMGMcivuz4oCt3K3ebpt3IOU X-Received: by 2002:a17:907:a4c3:b0:84d:150d:5006 with SMTP id vq3-20020a170907a4c300b0084d150d5006mr10232035ejc.49.1673196262639; Sun, 08 Jan 2023 08:44:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673196262; cv=none; d=google.com; s=arc-20160816; b=WMx45bm3lijhWr0bpqmVdfFq8e0rpJgkhZhwnlEEDqmhuwjVpEpaKeqp2VrSu7JqLM E3fKx1qmMvJkGpaQeieLXJTuHlNiF2VCH4oleWRWKwoN7dEgWZXGDrRZH1RKupS4xQQb ZFxQGDRctsVk4XS/NeynvdYqBAON83r0QmeS/RquWdFvdh5FzIXfFQS7igcUyjuU4KJP +lhVilIvluUtbT8NUAROJdFNNJOApT39gaU4Wo+hGsLZ3+lr/Gcuw2YZgkmGKeAEh6W3 QlN5nOPA2ZKY0Z4VoVtvF0XuRE2a0GrXg9tF0TaYH7AXYeUDE5afglqMBl1klh56xLN9 BuAA== 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=czk+BxBqXLbcX8vBDZkM9SLpx78mJGOepdVrmBCGSZo=; b=Kdn248D4XPyC5PY8AzRwSfjK+oNC2VxTyMUWoLUykVbLk2UmiBsQSASlKG8MQTRBhp nTZuaQnix3CUi6/ke8Dylrd6rMrMmQQ5BupgOC7QIazqNJeKNvBa1JZaiPKs6oBdpcWm DJsj4JgtTNf/2qMjKFdOaihiM0p59Pmon3zWUchWG7yolDCCH9clLkNNdBxYY2MPUJtR uu1ZdOYtHYm3X4Fts56z2l5WdxrEJfFR6RRAQh3oFY6fvm+b+1+E8D4dIuQCv+ZSoAr4 d4WJJ+2LGF2C3me4+L50jHuJ2uXtgI2YyKqLIV1AKCrR5TZyq/zAcHnKauDXGDNc7di+ HvfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RbTB+nz7; 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 wv4-20020a170907080400b007c0b52d0df1si7423052ejb.660.2023.01.08.08.43.59; Sun, 08 Jan 2023 08:44:22 -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=RbTB+nz7; 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 S236384AbjAHQbU (ORCPT + 99 others); Sun, 8 Jan 2023 11:31:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236166AbjAHQau (ORCPT ); Sun, 8 Jan 2023 11:30:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF10DEBE for ; Sun, 8 Jan 2023 08:30:48 -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 4D34360CF3 for ; Sun, 8 Jan 2023 16:30:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96FF8C433F0 for ; Sun, 8 Jan 2023 16:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673195447; bh=HMfqoBN2jjsgLZC0cOfkE8Ao3mxgv26yjkwXo5i9NOs=; h=Subject:From:To:Date:In-Reply-To:References:From; b=RbTB+nz7n41LxdtNgZG3ppoS4oZ3hcBnpp0YdGbvrOXrW70/rX9EmhSyn1KwOThPj ahVW5lqdrru1PySgbc4dbzG/LoqkmkJdGcXPJNFRuvPpIB/LFfFjtMYkoa7XQNdL7y PRJpyooCYXEYYkaHkzC8HHWsQd0mKdP0xqmKnn/DLHNVaGBSsZJfJl36ykYRaDsgRl fEmhisM1cB03P2iBdlRXPfHJemU5Zsz0cn+Oc/jJLYOMvp/1zB6Cm9exfj/Qzu3tiz NAto0MIvI+OdPe94S50kQ7kMXFdBt5ApZx+Rlq4SQJBFp+RLMHJIX3T2D3KaSiRhmS /nMlcN7ICHIsA== Subject: [PATCH v1 23/27] SUNRPC: Final clean-up of svc_process_common() From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Sun, 08 Jan 2023 11:30:46 -0500 Message-ID: <167319544675.7490.2458325017024377410.stgit@bazille.1015granger.net> In-Reply-To: <167319499150.7490.2294168831574653380.stgit@bazille.1015granger.net> References: <167319499150.7490.2294168831574653380.stgit@bazille.1015granger.net> User-Agent: StGit/1.5 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 The @resv parameter is no longer used. Signed-off-by: Chuck Lever --- net/sunrpc/svc.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index bcca1553c75a..bb58915622ca 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1225,7 +1225,7 @@ EXPORT_SYMBOL_GPL(svc_generic_init_request); * Common routine for processing the RPC request. */ static int -svc_process_common(struct svc_rqst *rqstp, struct kvec *resv) +svc_process_common(struct svc_rqst *rqstp) { struct xdr_stream *xdr = &rqstp->rq_res_stream; struct svc_program *progp; @@ -1455,7 +1455,7 @@ svc_process(struct svc_rqst *rqstp) if (unlikely(*p != rpc_call)) goto out_baddir; - if (!svc_process_common(rqstp, resv)) + if (!svc_process_common(rqstp)) goto out_drop; return svc_send(rqstp); @@ -1478,7 +1478,6 @@ int bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, struct svc_rqst *rqstp) { - struct kvec *resv = &rqstp->rq_res.head[0]; struct rpc_task *task; int proc_error; int error; @@ -1509,22 +1508,21 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, rqstp->rq_arg.len = rqstp->rq_arg.head[0].iov_len + rqstp->rq_arg.page_len; - /* reset result send buffer "put" position */ - resv->iov_len = 0; - - svcxdr_init_decode(rqstp); + /* Reset the response buffer */ + rqstp->rq_res.head[0].iov_len = 0; /* * Skip the XID and calldir fields because they've already * been processed by the caller. */ + svcxdr_init_decode(rqstp); if (!xdr_inline_decode(&rqstp->rq_arg_stream, XDR_UNIT * 2)) { error = -EINVAL; goto out; } /* Parse and execute the bc call */ - proc_error = svc_process_common(rqstp, resv); + proc_error = svc_process_common(rqstp); atomic_dec(&req->rq_xprt->bc_slot_count); if (!proc_error) {