Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp93445rdb; Thu, 31 Aug 2023 04:15:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEv+nvX6mciGFolk5m+3BkGtU6MWDeI5t9o8bbGMVLGfDITAdau61FUOEHSdPHpgN2KSc0w X-Received: by 2002:a05:6402:202a:b0:522:1956:a291 with SMTP id ay10-20020a056402202a00b005221956a291mr4001701edb.8.1693480502217; Thu, 31 Aug 2023 04:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693480502; cv=none; d=google.com; s=arc-20160816; b=Ta35CFQP4aRxy4HNB6kQNQUwub6D4Qh9ukM6PgYS/+WFJ8cM17bh39sjdKaejKE8wR fDjUwwuHdvuI2amHxes6K+VvfyGzKdRMWBBdN+QlOOVTRtvaA/rrCVzK6GRTp8Z684kn ffbE8i/GsssdR8zbXtVPTOABnbjhrYWARSE4eh/cwcs6iSNkY6SeJurr6NpO56xlaJkq lMwCeVHXb8YDMFa0zp+CKyyEPvHMEbcUdSdj6rtcvWdiOejQ+SH2h0jDjMvfw1rcnh8b K9JDMKfzZuREp1QGsFIGNBz/9Wnzpmhp8ha2GSXeJ8M5QrEmD8nZHN+4lei6CQZFEd1q ylEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=zL35cb2cbV/aZEdQfn5WUt1+RtMwa4sJY7cweJYRIBQ=; fh=v0JurnjNmv7Vu4jJ3LArXStqUYqXRsH2AWpyEOt/Cqw=; b=GuRq3jmbS4MGXx0rhP7Fk+W7ScrZLzVIcgVwC1r8e9jwHkS8qVx5ydmuqdBB0Y8DTP Dv3QwONEN65/+UpDDd8foXBspQLR8nmOy9Zs4i3Pwxurq9rddTuhnVFqN7aB4LTFuLft wLif+kBN7qo8Nz+OxUOWvEtHKrOwzHIwvcK/mK5/PwV6QwbxDpPM6n8tkLg8SHAbvC5x uyqDhRC+Z6jWSwlgWH/9ZtnN3lJjXjq/uEyXxI3wf/16f1HnqVUvvR0Vt85FscZ/maio AGvegan4jWMBnOq9O65CIAt0UX+8KHsO/x7VWmber9WCpfDMHp/JPuLbedlYnViAH0Hm 7sbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=edp5Bjn8; dkim=neutral (no key) header.i=@suse.cz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w21-20020aa7cb55000000b00522467311e0si910479edt.634.2023.08.31.04.14.21; Thu, 31 Aug 2023 04:15:02 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=edp5Bjn8; dkim=neutral (no key) header.i=@suse.cz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237156AbjHaKy4 (ORCPT + 99 others); Thu, 31 Aug 2023 06:54:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232759AbjHaKy4 (ORCPT ); Thu, 31 Aug 2023 06:54:56 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45F73CDD; Thu, 31 Aug 2023 03:54:52 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F0353211CE; Thu, 31 Aug 2023 10:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1693479290; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zL35cb2cbV/aZEdQfn5WUt1+RtMwa4sJY7cweJYRIBQ=; b=edp5Bjn8Z/6zG+gYXBdCnRvbC4HD5N/O0EKP02n7t3b9RcPVKGOl1OFGVEna53xLsxmoji vVCWALCyuerTDA5pvRjsb+NIVVycF1r7cGN8oKE2NQvWeN1wf2Bcn3ghno43tPaO57qk5o QyGgmY+yUyEU6zYZzBAXthHSUPZWUvk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1693479290; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zL35cb2cbV/aZEdQfn5WUt1+RtMwa4sJY7cweJYRIBQ=; b=jbh3cgZbamSfqw/PIFNRYiceCvoDRdbiH5jaNR7REh3SJ48G5gz1nrx9ltgsrJuaIOmteQ z2v7wmOylMLnwWBg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E135A13583; Thu, 31 Aug 2023 10:54:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id tmb7Nnpx8GQaSQAAMHmgww (envelope-from ); Thu, 31 Aug 2023 10:54:50 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 561C0A0767; Thu, 31 Aug 2023 12:54:50 +0200 (CEST) Date: Thu, 31 Aug 2023 12:54:50 +0200 From: Jan Kara To: Christoph Hellwig Cc: brauner@kernel.org, trond.myklebust@hammerspace.com, anna@kernel.org, jack@suse.cz, linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] NFS: switch back to using kill_anon_super Message-ID: <20230831105450.sdwtqnxp5vwmq5ej@quack3> References: <20230831052940.256193-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230831052940.256193-1-hch@lst.de> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no 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 On Thu 31-08-23 07:29:40, Christoph Hellwig wrote: > NFS switch to open coding kill_anon_super in 7b14a213890a > ("nfs: don't call bdi_unregister") to avoid the extra bdi_unregister > call. At that point bdi_destroy was called in nfs_free_server and > thus it required a later freeing of the anon dev_t. But since > 0db10944a76b ("nfs: Convert to separately allocated bdi") the bdi has > been free implicitly by the sb destruction, so this isn't needed > anymore. > > By not open coding kill_anon_super, nfs now inherits the fix in > dc3216b14160 ("super: ensure valid info"), and we remove the only > open coded version of kill_anon_super. > > Signed-off-by: Christoph Hellwig Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/nfs/super.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/fs/nfs/super.c b/fs/nfs/super.c > index 2284f749d89246..0d6473cb00cb3e 100644 > --- a/fs/nfs/super.c > +++ b/fs/nfs/super.c > @@ -1339,15 +1339,13 @@ int nfs_get_tree_common(struct fs_context *fc) > void nfs_kill_super(struct super_block *s) > { > struct nfs_server *server = NFS_SB(s); > - dev_t dev = s->s_dev; > > nfs_sysfs_move_sb_to_server(server); > - generic_shutdown_super(s); > + kill_anon_super(s); > > nfs_fscache_release_super_cookie(s); > > nfs_free_server(server); > - free_anon_bdev(dev); > } > EXPORT_SYMBOL_GPL(nfs_kill_super); > > -- > 2.39.2 > -- Jan Kara SUSE Labs, CR