Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1180679rwb; Thu, 6 Oct 2022 09:24:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4zzLZGuqss6U/VVeqFySXBfWPHFdqoVCMmbaMFwNWzNVk1+ykba2pK1dZm15gXwMrFsFY+ X-Received: by 2002:a17:902:f60b:b0:178:6a49:d4e3 with SMTP id n11-20020a170902f60b00b001786a49d4e3mr645980plg.75.1665073481118; Thu, 06 Oct 2022 09:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665073481; cv=none; d=google.com; s=arc-20160816; b=AuR03ef15mvNlUvQxWFguD2CNz8J+5ShUHKT7f/pRR9kL2HMBpNU8ku//jKRsYQbGP jl6XOp8vlII2i+II/Fi+/uNEmR/+UyTedoic8fL4phvGID/D3Ce36KmOQMXzWeGRgzFN jHObl01+NiCUX+luJX5nkJfTefNeByDG+4lt8fGogkRQmlAd4C15/4LPzMRDGfEEFIUv 7Zm03EBuN4wZ1ZhNuKYTBgCyhqaxoSnUxmyPcnUlkLrwM9morD4Tkt9VvI+c6bGC/G6H dsyE6ipD9tYiCaxYlGK5NVh6TIWVQ24u55FZVUezZg3s5HP82VF64sZfK/sQVRNlsJkz x61g== 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; bh=DC2pYJRPAZtkislensG1ik00E/maYG0xoYib6eN3ukY=; b=Mjpl42WMlpi5vgZqM+7BB1nbN9ypTSYMBAI94At+2BCruVuxtcHLRph45ahlWl0QTt ACfnHqShxkaqjpVnb+1St5YoM+mCCYpPjvHHMU65f+SXEFBN25gRkZw2TiBO4BCXtW5c SdO0TR2IWMVCoGLKeLaNlJQDF35jT3iDiAyIL8X5yu3KpTe1rzBL4rb4vTUCxJP1yTnr e/AyqTl7gpXPHAcT895hEyMzNXbNgX5jHilvyUl37A1lz4ed/JiIYBGXkA3MHfKoK0Xi 1K+Q8l74rZwDac83+W+7XqnXwDINOZ3HPuVAxRkN2f9FweQh7SYBZZRoTUZgyHX3utCF 3WNA== 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 l5-20020a63ea45000000b0044063612fa1si19913482pgk.747.2022.10.06.09.24.28; Thu, 06 Oct 2022 09:24:41 -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 S229946AbiJFQVA (ORCPT + 99 others); Thu, 6 Oct 2022 12:21:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231200AbiJFQU6 (ORCPT ); Thu, 6 Oct 2022 12:20:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EECE79C7E3 for ; Thu, 6 Oct 2022 09:20:56 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 8D7A061A10 for ; Thu, 6 Oct 2022 16:20:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1B7BC433D6 for ; Thu, 6 Oct 2022 16:20:55 +0000 (UTC) Subject: [PATCH v2 8/9] NFSD: Clean up nfs4_preprocess_stateid_op() call sites From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Thu, 06 Oct 2022 12:20:55 -0400 Message-ID: <166507325503.1802.3816820584178758760.stgit@manet.1015granger.net> In-Reply-To: <166507275951.1802.13184584115155050247.stgit@manet.1015granger.net> References: <166507275951.1802.13184584115155050247.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 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: