Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1764482rdh; Tue, 26 Sep 2023 02:56:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9e+kGl0KiTh2qsEy9hEw/UMHFPPsy07rZnxqGukNDQBJ7GYnNeeG+CyKBgdG3nWTzpJwC X-Received: by 2002:a05:6a00:178b:b0:68f:dfea:9100 with SMTP id s11-20020a056a00178b00b0068fdfea9100mr12076424pfg.21.1695722201229; Tue, 26 Sep 2023 02:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695722201; cv=none; d=google.com; s=arc-20160816; b=qmdZHAWLOwiG9aeNqjhX9hNx5fJ9G8JkuM+RxMA7R/KSdv1HZQ1Fd9NmdZV3Tbwu/v +N7bYQP7sFIELgPVyc3ZpiQG8Xu8lR21Y0U/XDZfHUgTP/bhvKv9ECnh1de/j8kugGu8 4OvwcPKMq23+fw4sHDS2Gw8WU51dQT3qZVje7T8pl91KMuduAnCDgfAWXQUSJ3YY1nbh r4AdiL8Rgk9VwxEzfJtte8JYkRN/34dPm5ta252/APJKSqd0rCsd7BU7SCO4OOI7wciD GeZTzu3oYEo++8zn1yFTuk5jHhIY1QO7DLrDuOoL4w+Sjqq5FCCeks1gxmcJipwHNXkB yadQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=YMQIrSydp5/EnzdVzi7hTLYAN2Om+Rc7NqAZU+fRf/w=; fh=lh99GjlxSO9FiSpYSS9Em5pb4zrXMbAuyfX/uVHOSd8=; b=IEDU8/tzCIjeTsjtzMBN+PWLLjZHu9ieWe7oUMw85YSx9DvWXtd8FzGNgzjKuNTyic yALyzjPZY9SqxseiEuW6BcEIqjxzDqGnvCyVGxys36ts4A9K8M/wpiL3Dk8bsX+HZ5RE EHu6he272WntM/G63mQz4Wrn+Gw6Yyixex19s/01pj1uN6MG7cve0FzlnznT6SZHGHr/ jA+8F9Sl0mxfc570pi2z0kGNs86CRpMfebEge6+YBwosnYP1jkmOHsXzTNhcN1bg419+ B0aQt9+DoJwPtq+s9Swt8qipdn8BwS5qRe6UVFZ29lpZirQ8+3XoGfosogsX1Np+T0h8 cDhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id c6-20020a633506000000b00578afd566cesi1417476pga.594.2023.09.26.02.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 02:56:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 011E1826009C; Tue, 26 Sep 2023 02:31:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234215AbjIZJbl (ORCPT + 99 others); Tue, 26 Sep 2023 05:31:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233835AbjIZJbk (ORCPT ); Tue, 26 Sep 2023 05:31:40 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29D50BE; Tue, 26 Sep 2023 02:31:34 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 1A2D668AA6; Tue, 26 Sep 2023 11:31:30 +0200 (CEST) Date: Tue, 26 Sep 2023 11:31:29 +0200 From: Christoph Hellwig To: Christian Brauner Cc: Al Viro , Christoph Hellwig , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Fenghua Yu , Reinette Chatre , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Dennis Dalessandro , Tejun Heo , Trond Myklebust , Anna Schumaker , Kees Cook , Damien Le Moal , Naohiro Aota , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org, linux-hardening@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH 03/19] fs: release anon dev_t in deactivate_locked_super Message-ID: <20230926093129.GA13806@lst.de> References: <20230913111013.77623-1-hch@lst.de> <20230913111013.77623-4-hch@lst.de> <20230913232712.GC800259@ZenIV> <20230914023705.GH800259@ZenIV> <20230914053843.GI800259@ZenIV> <20230914-zielt-einzog-00389009b293@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230914-zielt-einzog-00389009b293@brauner> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 02:31:43 -0700 (PDT) On Thu, Sep 14, 2023 at 09:56:57AM +0200, Christian Brauner wrote: > > BTW, this part of commit message in 2c18a63b760a is rather confused: > > Recent rework moved block device closing out of sb->put_super() and into > > sb->kill_sb() to avoid deadlocks as s_umount is held in put_super() and > > blkdev_put() can end up taking s_umount again. > > > > That was *NOT* what a recent rework had done. Block device closing had never > > been inside ->put_super() - at no point since that (closing, that is) had been > > introduced back in 0.97 ;-) ->put_super() predates it (0.95c+). > > I think the commit message probably just isn't clear enough. The main > block device of a superblock isn't closed in sb->put_super(). That's > always been closed in kill_block_super() after generic_shutdown_super(). Yes. > But afaict filesystem like ext4 and xfs may have additional block > devices open exclusively and closed them in sb->put_super(): > > xfs_fs_put_super() > -> xfs_close_devices() > -> xfs_blkdev_put() > -> blkdev_put() > > ext4_put_super() > -> ext4_blkdev_remove() > -> blkdev_put() Yes.