Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp960941imi; Fri, 22 Jul 2022 13:38:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vBsnZf403c3PfnyF8p2LIvxU9EN63Lk9zbSVofRsLwwth8CXvYf1mBxbKRbckV00n31/Yh X-Received: by 2002:a17:903:11d0:b0:16b:80cf:5d9 with SMTP id q16-20020a17090311d000b0016b80cf05d9mr1263456plh.91.1658522309995; Fri, 22 Jul 2022 13:38:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658522309; cv=none; d=google.com; s=arc-20160816; b=zABca84uZi9OEUWbowkNBp0E0uEiIlpNCoYtubPmtSfdP0ycYz+1DDI7u+8RSge48I z4O26fSvwLxgJaJMEIyhX1cyIWMK8rh4w7S9uw7AF5ZD72bLzugTVQ2kqcmbIoT3n1GG 2QW8o297J73gPW2ZaOAUbRemCzh4SS1hRVLx/dA67cgeBUGu1fBOAmlMBV/LFL/fAX6X +8ULow8PdcknJZ0QLNZZQlQE6Bg6I9QjtPvTCosj1g5Lo8s3ebcAvWFA5BHplpkTucyt TgPX4AmOTwUMs/VJyjBvKeYGPFPzClHe2sMNJYP2MJBO64WTrqsx7bTPB44qCSU+VTvm 9sbA== 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=0hRkqxvGfnGKchTdpUgjrqxvvnEbN0oWdYtT6QWfF70=; b=F+xyKnQE/7VtJ/Ge/u865aOZ0z2idx6e8bUVSe2c0hYM0fHLB4sNQWk+puQ4v4qL6I uHyJxhT++qCzUKd3L9alUfWyJHfvuMuHxpnqMc+JGKBxNtNy0clvpi8oXsujS9w8Aa7P 1gEkebw7M0JI0xDeD6rc2X4IqCXRXJlS5F9YC5ovJKyA7kzJhYmVFHJcP0a4pKFc5upa iVey6X2/JMKAIFoo2HaWrRauv4FhQOCsJSg0r4R0xuT/QKoj8Qb2l4DcDKY9S+eUyel6 FqYcYD4BnKO5yyb5/oFgzvysbv4GdEdpjLPq4BtWvWIj90LXotIyb1T6mG2lpC7mWWBm LraQ== 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 f12-20020a056a001acc00b0052b41c179d9si7471674pfv.338.2022.07.22.13.38.15; Fri, 22 Jul 2022 13:38:29 -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 S236565AbiGVUTi (ORCPT + 99 others); Fri, 22 Jul 2022 16:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236531AbiGVUTi (ORCPT ); Fri, 22 Jul 2022 16:19:38 -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 7DA427F50A for ; Fri, 22 Jul 2022 13:19:37 -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 3BD14B82A1E for ; Fri, 22 Jul 2022 20:19:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D600AC341C6 for ; Fri, 22 Jul 2022 20:19:34 +0000 (UTC) Subject: [PATCH v1 06/11] NFSD: Refactor nfsd4_cleanup_inter_ssc() (1/2) From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Fri, 22 Jul 2022 16:19:33 -0400 Message-ID: <165852117386.11403.1714921881094753525.stgit@manet.1015granger.net> In-Reply-To: <165852076926.11403.44005570813790008.stgit@manet.1015granger.net> References: <165852076926.11403.44005570813790008.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 The @src parameter is sometimes a pointer to a struct nfsd_file and sometimes a pointer to struct file hiding in a phony struct nfsd_file. Refactor nfsd4_cleanup_inter_ssc() so the @src parameter is always an explicit struct file. Signed-off-by: Chuck Lever --- fs/nfsd/nfs4proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index e459384b8bee..bbefa2225f22 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1554,7 +1554,7 @@ nfsd4_setup_inter_ssc(struct svc_rqst *rqstp, } static void -nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src, +nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct file *filp, struct nfsd_file *dst) { bool found = false; @@ -1563,9 +1563,9 @@ nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src, struct nfsd4_ssc_umount_item *ni = NULL; struct nfsd_net *nn = net_generic(dst->nf_net, nfsd_net_id); - nfs42_ssc_close(src->nf_file); + nfs42_ssc_close(filp); nfsd_file_put(dst); - fput(src->nf_file); + fput(filp); if (!nn) { mntput(ss_mnt); @@ -1608,7 +1608,7 @@ nfsd4_setup_inter_ssc(struct svc_rqst *rqstp, } static void -nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src, +nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct file *filp, struct nfsd_file *dst) { } @@ -1726,7 +1726,7 @@ static __be32 nfsd4_do_copy(struct nfsd4_copy *copy, bool sync) } if (nfsd4_ssc_is_inter(copy)) - nfsd4_cleanup_inter_ssc(copy->ss_mnt, copy->nf_src, + nfsd4_cleanup_inter_ssc(copy->ss_mnt, copy->nf_src->nf_file, copy->nf_dst); else nfsd4_cleanup_intra_ssc(copy->nf_src, copy->nf_dst);