Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10855819rwl; Mon, 2 Jan 2023 09:13:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXv8lsOyCY+2jnG54mI8GyNEinz+WYCQe/02qrw2jTKQcDNVBWJhT61p/mdOhCBWqkTBPIeI X-Received: by 2002:aa7:c704:0:b0:47e:22ac:625c with SMTP id i4-20020aa7c704000000b0047e22ac625cmr32337009edq.41.1672679612961; Mon, 02 Jan 2023 09:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672679612; cv=none; d=google.com; s=arc-20160816; b=LlVGEvJGBmWS461gf6zeaE8xEDeDIf53BVAbU0tigI7M8o6rfM8eCAxAObhOORvVcW 4HkNJc+SX4lr/5yrVLyXHIMjgiiJ1FFg3Y19Si0u8eYtOVUwNtPLoLBH7bWv9xqVIK43 yhAhvos5sD4Mxv7rTzuxH/4Ddino4a/zdn5wM/F0D5CRfEyAnvUMlzQraFfCcz7d+wUw VKv0NEWarRT4M01DuwWM2tO75SUD+Z2Clc+YqRixqx+1KTxcSAHEPclsYN/vDjj/QHKI yolg/lqxthmc4n/WzPtTXfjmf2ySYqIfEg9IzY6Btn0w2S2J3f95XvKoYA4CMViqt6bI bxjw== 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=ctvYTILhwZLmApKDwOWHDxII/gcn3NVdI8k0DZ/E/rw=; b=QEJX2ktWXQO2QdpgXcWNIFYEVVVBfk2Vi8KpmySbsGB+l4FnRxxrm4qOIDVPvq4uXs z/9i+XBikC4+0iPNwf/EGnn4wdcRUkoKFVjsuIdGDwKonPDXV//MGbV2lQASG3rFRUjP q8LrlVwXQcZ/o6eQyTHCKR6Hqd3ixjWPVwVB8oyGqcGnQoYiPNyUCcEWQK3qbHr/rkub 9lzWKzOi9exH3XhdWRXtOj6Is9Ob6aj4Lq0bH6mnVVqWprb0WTrbNIeZoJoCn9FeaHhZ wWDDrNiq9G8lMgNHsVeDafW+lnm3+viYFcEHZwuMJd7rUFPQvBJV6t56RimdRNWz6TcB DlEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jutxukQp; 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 h11-20020a05640250cb00b0048b0ae570d8si10693478edb.508.2023.01.02.09.13.08; Mon, 02 Jan 2023 09:13:32 -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=jutxukQp; 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 S235952AbjABRFf (ORCPT + 99 others); Mon, 2 Jan 2023 12:05:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235326AbjABRFf (ORCPT ); Mon, 2 Jan 2023 12:05:35 -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 3AF81B86F for ; Mon, 2 Jan 2023 09:05:33 -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 B19B160018 for ; Mon, 2 Jan 2023 17:05:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFD4CC433D2 for ; Mon, 2 Jan 2023 17:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672679132; bh=CS8aio7Ovgfw9jobnM0EAIGPAylSV5/miggRu7ZJHrM=; h=Subject:From:To:Date:In-Reply-To:References:From; b=jutxukQpp3KHMy26KLWlJE7rUNpKhUYDIIJJllZu/3Wc4aY2153SKxjt91lba8TzN G+xha30WsTOu/9YLx15tpxGIaobYOF1YVomLuZzA1M/YnT0NOrl9ejeOAlhPWRBX9d OS1oegMyc3onwjkaz0HTsmk9q6ivD8+FHSlg/NUqE9eSkJ0+wvAlb9Y6fwRq6D2nR6 xKsayfkaLGNXloLh9WzRU2cKb7TZcge1M9/IfOsYBAfNwe/KU8P8deNknW6kpgQB0C LIcgzCXjnr0KzKzMxySRj5jNkkd8wfG3Ie9chDJGi+AJTtIxJCWf24D3U5mwBVqviD gF9r5kGQtkgzA== Subject: [PATCH v1 01/25] SUNRPC: Push svcxdr_init_decode() into svc_process_common() From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Mon, 02 Jan 2023 12:05:30 -0500 Message-ID: <167267913075.112521.8824598052324769614.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 Now that all vs_dispatch functions invoke svcxdr_init_decode(), it is common code and can be pushed down into the generic RPC server. Signed-off-by: Chuck Lever --- fs/lockd/svc.c | 1 - fs/nfs/callback_xdr.c | 1 - fs/nfsd/nfssvc.c | 1 - net/sunrpc/svc.c | 1 + 4 files changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 59ef8a1f843f..e56d85335599 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -695,7 +695,6 @@ static int nlmsvc_dispatch(struct svc_rqst *rqstp, __be32 *statp) { const struct svc_procedure *procp = rqstp->rq_procinfo; - svcxdr_init_decode(rqstp); if (!procp->pc_decode(rqstp, &rqstp->rq_arg_stream)) goto out_decode_err; diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index d0cccddb7d08..46d3f5986b4e 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c @@ -984,7 +984,6 @@ nfs_callback_dispatch(struct svc_rqst *rqstp, __be32 *statp) { const struct svc_procedure *procp = rqstp->rq_procinfo; - svcxdr_init_decode(rqstp); svcxdr_init_encode(rqstp); *statp = procp->pc_func(rqstp); diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 56fba1cba3af..5375a28b102a 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -1040,7 +1040,6 @@ int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp) */ rqstp->rq_cachetype = proc->pc_cachetype; - svcxdr_init_decode(rqstp); if (!proc->pc_decode(rqstp, &rqstp->rq_arg_stream)) goto out_decode_err; diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 85f0c3cfc877..96806c3c61a5 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1302,6 +1302,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) if (progp == NULL) goto err_bad_prog; + svcxdr_init_decode(rqstp); rpc_stat = progp->pg_init_request(rqstp, progp, &process); switch (rpc_stat) { case rpc_success: