Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2012940rwb; Wed, 5 Oct 2022 07:58:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5fQuBExSYM8GQ076SlWvgsZcAWENSizwGcV/mbR97HQqQjDFEsAcSv4WUOUKWVfW5kPyj7 X-Received: by 2002:a17:902:ec89:b0:178:3ea4:2960 with SMTP id x9-20020a170902ec8900b001783ea42960mr151594plg.160.1664981898369; Wed, 05 Oct 2022 07:58:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664981898; cv=none; d=google.com; s=arc-20160816; b=DNKM/T5WcUaG6vH+sS36Uo5AYcBZyBQXdTG3ebvOiTpDt2oHXkYAijbqPXapfE4VxR EmHblyruRVzugnqgFd0PuW8dJXgTXd6t1QrdoJB/Z2dYbq6gUlreXQROG/+ajHa/tQaj soJq06QoPUhJB6gZYAS1I5EHKqkVm5CKKIuyabd168lm0kK3qXryYFL5+CWf5PNRl/YK vsT7QvioCLgJCbHAZw0zGVPdg/7+uJXJkB1/4UBjNwysbd1KlVkPuDOzCX8RHMGlnP5F GTDTjmyUXwtbhLn9X551tzJXCdkfrUPluZ6h/V2eNjcPtJW1MlFEfKWy/L9eswBSwkoT cFnw== 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=F0vjeueo5J/Lm9coGjh/bADXRL8nSQQboJp+vWuk3VM=; b=jCeDBMpRNYpyRVmJyvJfacNRs2oAEL7v1SNZUJazLyKb0M1flt28jkzGW9LK0tZAC/ oJLz2+KZF7HCXITV4RcAvVNOtZVeG6b8LZcd8mM7eYwpUSp+3SPgS6jjGNwGFoBFsU/J rIUw9qbQcb5ELEon2HREzh5fNwtF2+KX40IDBOyePPNLyOWTzChrmxbtOz4UO23mFHWi nzg9uzLLtJEZR1I2v6rectg9QseoGdPC4MR+EdXEstvdB4SgUfiSxfGynvxpWesSZowS pzhOQvRj45zNIa8Pt2Wlf9TGO4mfs9tSlp2tNzSSY1TEFPvbzrWG+YIMWw7o85+AgXe9 dXbg== 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 q11-20020a17090a9f4b00b0020acb709898si1873064pjv.184.2022.10.05.07.57.50; Wed, 05 Oct 2022 07:58:18 -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 S230145AbiJEO4a (ORCPT + 99 others); Wed, 5 Oct 2022 10:56:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbiJEO43 (ORCPT ); Wed, 5 Oct 2022 10:56:29 -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 C1317644A for ; Wed, 5 Oct 2022 07:56:28 -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 5DD3D61697 for ; Wed, 5 Oct 2022 14:56:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6CCAC433C1 for ; Wed, 5 Oct 2022 14:56:27 +0000 (UTC) Subject: [PATCH RFC 8/9] NFSD: Clean up nfs4_preprocess_stateid_op() call sites From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Wed, 05 Oct 2022 10:56:26 -0400 Message-ID: <166498178682.1527.2423899374993202065.stgit@manet.1015granger.net> In-Reply-To: <166497916751.1527.11190362197003358927.stgit@manet.1015granger.net> References: <166497916751.1527.11190362197003358927.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. 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: