From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD33C83F2F for ; Thu, 31 Aug 2023 06:26:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343945AbjHaG0a (ORCPT ); Thu, 31 Aug 2023 02:26:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239811AbjHaG03 (ORCPT ); Thu, 31 Aug 2023 02:26:29 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 220ACB9; Wed, 30 Aug 2023 23:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=LwdSnI9S0JYXWh+eL2hyD3GQiufQtnb92hxiHRk+1vw=; b=L6dWyFlpRzqYRnFQAVYG3e9SiL JRG/DI3XsRLLiJ999EWYCTrQKKBdAJcWKcQJzzVXmqfpmvn87nQefmL0/EVzo0uDTb3CNpirDXD7S UiSrBZDMzpFg/+OiJt4gN+iZ9UGm5+cKBKv0K0WMEAc7mGZ95VtdPLDuNYnjQRiuF8uRFfidG4lmx POCt0DcNYKm6kaZ3KIzfYQC1acQ5Vq1BJC260/UqAIWYhjtfd9BFZpbsT5uFOu7tlLkmT4fnM9KtQ rWvf1vBs9tGki++8hRvgEfKskqWydvW05L+k2+WR+kYZW8qHGsexV18cXEtkylfDG/UGh+VZ6DKBB eWnEJlKQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qbb7R-002Gtw-1A; Thu, 31 Aug 2023 06:25:29 +0000 Date: Thu, 31 Aug 2023 07:25:29 +0100 From: Al Viro To: Christoph Hellwig Cc: Christian Brauner , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Paul Moore , Stephen Smalley , Eric Paris , linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, selinux@vger.kernel.org Subject: Re: [PATCH 1/4] ramfs: free sb->s_fs_info after shutting down the super block Message-ID: <20230831062529.GD3390869@ZenIV> References: <20230831053157.256319-1-hch@lst.de> <20230831053157.256319-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230831053157.256319-2-hch@lst.de> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Aug 31, 2023 at 07:31:54AM +0200, Christoph Hellwig wrote: > sb->s_fs_info can only be safely freed after generic_shutdown_super was > called and all access to the super_block has stopped. > > Thus only free the private data after calling kill_litter_super, which > calls generic_shutdown_super internally. Take a look at what ramfs uses that thing for. Remount and ->show_options(). Neither is an issue in ->kill_sb(). I don't really hate that patch, but commit message is flat-out incorrect in this case.