Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6481363rwi; Tue, 18 Oct 2022 13:02:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4byWPj8KJgHE9b/CFetEil0MC9TbbVFhlopk0F9myFDMOiaHR6MHtdFt4/zYA+TA63L10W X-Received: by 2002:a17:907:2d91:b0:78d:8747:71b4 with SMTP id gt17-20020a1709072d9100b0078d874771b4mr3778109ejc.545.1666123337607; Tue, 18 Oct 2022 13:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666123337; cv=none; d=google.com; s=arc-20160816; b=SFEZtFc0+hFcPtpGuETO62fgTzj8eiWNxU0eGP0NxWbyBjP34Gq5sN7StXQ8+N2+2e pNp5m2kxN+B8r9n7ZgHJyLulruAvadHDbPjYtv9/Mri6gG7k2H8AGluP1b0akR8/aLq2 2GoExR4MXR0umLmqgKyiEvsP0R2PlPYnOna6pdAGjgbfcnDMPR9jo2HKXmomn8vkRUQM XcKMyLI5yewJJcveeJ45joy4t7Uqd+4cfp1rAbSQg7zHgZLs0c4qxOlex3VUifCqZ/uy pXU9uRIgbURr+L8hb1fBQ7iJB3kRtEFbXRUOVJNvtsEsg2Fy9kNTwe1/dbObHX/kE6lx 6sJw== 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=od6abdZ50f4VXs8MbmVpEgFunBcfPdnfwKmGjAwVH0QGrbauveyAv4I49Lf2PtKMkS mRywDpP5x3Sa6eghKfu0nUCG3f/5ybDRw8kSrEDFg5XBKkZBN9koX1RzXGU8h63CCauO PN1EGnenHsz2kHLjRwDCZrc0o7kIW9jmNEA7+bJRbpaHHMK+58LI5ipYXGWIyAypXYTW fLjJHNDJhhPSTJW9BXMpWEbIA4IlGRixJqhrlLDu+FUtIgR+x89J+DIc1IrcvWg/4rSb +qdsy7h6OWoNnizPMOnj4foGHxXFCJvpgDD1j9W4Brs5n8v+hiEabI8lUMyMP0pheHzD JFJw== 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 de3-20020a1709069bc300b00782b24c1ed8si9656238ejc.368.2022.10.18.13.01.27; Tue, 18 Oct 2022 13:02:17 -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 S229959AbiJRT7Q (ORCPT + 99 others); Tue, 18 Oct 2022 15:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230059AbiJRT7D (ORCPT ); Tue, 18 Oct 2022 15:59:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C03959AFDE for ; Tue, 18 Oct 2022 12:59:00 -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 6D975B82102 for ; Tue, 18 Oct 2022 19:58:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FE8DC433C1; Tue, 18 Oct 2022 19:58:57 +0000 (UTC) Subject: [PATCH v4 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: Tue, 18 Oct 2022 15:58:57 -0400 Message-ID: <166612313715.1291.18336518330196681476.stgit@manet.1015granger.net> In-Reply-To: <166612295223.1291.11761205673682408148.stgit@manet.1015granger.net> References: <166612295223.1291.11761205673682408148.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: