Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4647399rwi; Mon, 17 Oct 2022 08:53:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7hv7l83Pf2VORfjOSZqPhW9XhqKnrE/oQvloRZa/WAv3H1X16DI/JYGb5LQLf35IA24fao X-Received: by 2002:aa7:c054:0:b0:453:98c6:f6c4 with SMTP id k20-20020aa7c054000000b0045398c6f6c4mr10809481edo.2.1666022003767; Mon, 17 Oct 2022 08:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666022003; cv=none; d=google.com; s=arc-20160816; b=Tmfa08IVidfxpven3dwmzJRfSLg8/jhq2BLTMG1r1J69Wxuufs0Sse0o+vEOjuseCW gMFi7tOfGiUx3wizwnReJM+zj/FoCasPKUu2aoMlv0N8chp6oEhhJncOKG3kfK8Te2fm jqdlpmhAVEETn5uYJgM/LGEzZ+LoF/ndT+EZ2gw82RImwm6e10WvCjSsij5bFGu5XRi1 Ape98fw0oECecLyKrAdEJ42hJf29U44c2pM0tOeHmQ8JXIfMVJ8vFAzbTP/KM/+NABJg ZeuEJlkAFTOwctlXIkiA0RZSAlVl+s/cnU9NwfmyUZBrDzJ6WwgfxBX76s/vuaMu5JDy sZ2g== 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:cc:to:from :subject; bh=dC1v2howMfSeQJniLHJde+i51IGOOF43Ag5BucZok5c=; b=mmEzzEn6kDeaw4t9VwypzFencB7fiaKLxtFnmBtxzpjHFL6j9r8NSXiR0FG1WaDotK aJwhjEgNGffh+WzUiY7Nbms3p1lOpRcraUpSZXML5nt3uvGCBxAuVRd+ztKQIiuG6m1e NbuOPT5Akr2KmwZ480oBPnySef+DUKMZF7t/54duIewG06aRvO8oCpezxz3LramRIwpY WY0oJUgTL33wZmfCn4cYBYEKRgpC+aG2kbVpxzS7Cuxshg9m8utzvfmzpdyB4LFdNLxE gm0pD3w7RSsqd+2EHe+cD1gcZIBeyO/TGl0BAjnFLeAWp3Y27n4uc6q4fphGxKOUaxVB fONA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y22-20020a056402359600b00458b42ff418si9545615edc.221.2022.10.17.08.52.57; Mon, 17 Oct 2022 08:53:23 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231580AbiJQPFB (ORCPT + 99 others); Mon, 17 Oct 2022 11:05:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231215AbiJQPEv (ORCPT ); Mon, 17 Oct 2022 11:04:51 -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 E48151BE9E for ; Mon, 17 Oct 2022 08:04:39 -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 6A121B818CB for ; Mon, 17 Oct 2022 15:02:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03A09C433B5; Mon, 17 Oct 2022 15:02:54 +0000 (UTC) Subject: [PATCH v3 6/7] NFSD: Clean up nfs4_preprocess_stateid_op() call sites From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: neilb@suse.de Date: Mon, 17 Oct 2022 11:02:54 -0400 Message-ID: <166601897402.1714.18035781133092401829.stgit@manet.1015granger.net> In-Reply-To: <166601838800.1714.17970169995665888062.stgit@manet.1015granger.net> References: <166601838800.1714.17970169995665888062.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=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,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 Remove the lame-duck dprintk()s around nfs4_preprocess_stateid_op() call sites. Reviewed-by: Jeff Layton Tested-by: Jeff Layton Signed-off-by: Chuck Lever --- fs/nfsd/nfs4proc.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index d0d976f847ca..42b81e88ea14 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -951,12 +951,7 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, &read->rd_stateid, RD_STATE, &read->rd_nf, NULL); - if (status) { - dprintk("NFSD: nfsd4_read: couldn't process stateid!\n"); - goto out; - } - status = nfs_ok; -out: + read->rd_rqstp = rqstp; read->rd_fhp = &cstate->current_fh; return status; @@ -1125,10 +1120,8 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, &setattr->sa_stateid, WR_STATE, NULL, NULL); - if (status) { - dprintk("NFSD: nfsd4_setattr: couldn't process stateid!\n"); + if (status) return status; - } } err = fh_want_write(&cstate->current_fh); if (err) @@ -1176,10 +1169,8 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, write->wr_offset, cnt); status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, stateid, WR_STATE, &nf, NULL); - if (status) { - dprintk("NFSD: nfsd4_write: couldn't process stateid!\n"); + if (status) return status; - } write->wr_how_written = write->wr_stable_how; @@ -1210,17 +1201,13 @@ nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh, src_stateid, RD_STATE, src, NULL); - if (status) { - dprintk("NFSD: %s: couldn't process src stateid!\n", __func__); + if (status) goto out; - } status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, dst_stateid, WR_STATE, dst, NULL); - if (status) { - dprintk("NFSD: %s: couldn't process dst stateid!\n", __func__); + if (status) goto out_put_src; - } /* fix up for NFS-specific error code */ if (!S_ISREG(file_inode((*src)->nf_file)->i_mode) || @@ -1955,10 +1942,8 @@ nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, &fallocate->falloc_stateid, WR_STATE, &nf, NULL); - if (status != nfs_ok) { - dprintk("NFSD: nfsd4_fallocate: couldn't process stateid!\n"); + if (status != nfs_ok) return status; - } status = nfsd4_vfs_fallocate(rqstp, &cstate->current_fh, nf->nf_file, fallocate->falloc_offset, @@ -2014,10 +1999,8 @@ nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh, &seek->seek_stateid, RD_STATE, &nf, NULL); - if (status) { - dprintk("NFSD: nfsd4_seek: couldn't process stateid!\n"); + if (status) return status; - } switch (seek->seek_whence) { case NFS4_CONTENT_DATA: