Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7600794rwi; Mon, 24 Oct 2022 17:27:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63HbFtF4zTA8tDHYxcLaixVfupHmf5fsvS41TJANEnL80d//5tiWEU6C+J0f+AH3p7abFd X-Received: by 2002:a05:6402:294a:b0:461:b661:d903 with SMTP id ed10-20020a056402294a00b00461b661d903mr8456673edb.407.1666657673020; Mon, 24 Oct 2022 17:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666657673; cv=none; d=google.com; s=arc-20160816; b=lnc2X+y2b/YX7S9UIZknOb9I7j1bfDuPl/6OsJaVJ2cH94k48AvtOrAL28G/XtTgGX /SB3VQDFfeszZfSSGNMUSO8LV5Op3EKb4cLEdVmFbVsz6UovJnTP99y8GJgHTVx0l+kv ms2CesMaemp8DFVaGn8d1RbpV4b3AXNZU+xphoi50MTsUmNKtouaucRrKBDJ+yqrca8U Wf4ZTSDZa+TIZ88Q7yw//EQlEOHAcdAqe3WBrg4cZ5EcpxhgUqTZY6uyjbgSEg5rWIUv PwKyT/rVBNhyH7KXS8yiyciio/Djww2TzrCttDCCEQ0m3i9Yr5XIHY21CJ/GIy/EoRmg qfow== 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=ULDUMFZs/fp3HFefoZgqaODxyQKPF4taiNVY3EXs9CM=; b=AVvsmGhasXhWhUVB9pIagdg9BF/D+zkghDGHxyH202PI/7zK+MHbQLgaOWWDPB64M+ tVIjENxf78uoDroa79Ku/UOq2bMVYjzFre54A608sqNYZZpq4CtDAHL68I3iPD8lGqEV SrqVSP3ZZ3WlIP7HRTVWZiA7ubMH52L6bZr8Q6l46qDBWWAC2KRMlp/5pHL1CMwQcjRy wwnbeKMC2x4KtkSijafO4GC4ckCrKvGXRZq5shIErmTP6OkfPaVHK5yITWXha3m0HtLs jdtEE0rWyTzotH6j+olT6pNUUVBFXW7IO6DlYVjlhxyPaUxuv8BewG8GbYYrzZrzc8iL +YAw== 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 ht10-20020a170907608a00b0078217f3a033si1175958ejc.652.2022.10.24.17.27.27; Mon, 24 Oct 2022 17:27:53 -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 S231178AbiJYARr (ORCPT + 99 others); Mon, 24 Oct 2022 20:17:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231201AbiJYARc (ORCPT ); Mon, 24 Oct 2022 20:17:32 -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 B02F8B517E for ; Mon, 24 Oct 2022 15:37:22 -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 DE45AB810B2 for ; Mon, 24 Oct 2022 22:37:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75D91C433D6; Mon, 24 Oct 2022 22:37:19 +0000 (UTC) Subject: [PATCH v5 04/13] NFSD: Clean up nfs4_preprocess_stateid_op() call sites From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: neilb@suse.de Date: Mon, 24 Oct 2022 18:37:18 -0400 Message-ID: <166665103858.50761.3667145476400994190.stgit@klimt.1015granger.net> In-Reply-To: <166664935937.50761.7812494396457965637.stgit@klimt.1015granger.net> References: <166664935937.50761.7812494396457965637.stgit@klimt.1015granger.net> User-Agent: StGit/1.5.dev3+g9561319 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 42db62413890..6f7e0c5e62d2 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -943,12 +943,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; @@ -1117,10 +1112,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) @@ -1168,10 +1161,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; @@ -1202,17 +1193,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) || @@ -1957,10 +1944,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, @@ -2016,10 +2001,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: