NTFS3 file system kernel mode driver
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Jan Kara <jack@suse.cz>, Guenter Roeck <linux@roeck-us.net>,
	Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	linux-fsdevel@vger.kernel.org, ntfs3@lists.linux.dev
Subject: Re: [PATCH] ntfs3: drop inode references in ntfs_put_super()
Date: Fri, 8 Sep 2023 13:27:54 +0200	[thread overview]
Message-ID: <20230908-grundlos-morgig-e055946fde44@brauner> (raw)
In-Reply-To: <20230908081213.GA8240@lst.de>

On Fri, Sep 08, 2023 at 10:12:13AM +0200, Christoph Hellwig wrote:
> On Thu, Sep 07, 2023 at 06:03:40PM +0200, Christian Brauner wrote:
> > Recently we moved most cleanup from ntfs_put_super() into
> > ntfs3_kill_sb() as part of a bigger cleanup. This accidently also moved
> > dropping inode references stashed in ntfs3's sb->s_fs_info from
> > @sb->put_super() to @sb->kill_sb(). But generic_shutdown_super()
> > verifies that there are no busy inodes past sb->put_super(). Fix this
> > and disentangle dropping inode references from freeing @sb->s_fs_info.
> 
> Sorry for the delay, I've been travelling.  Wouldn't it make more
> sense to just free it in ->kill_sb before calling kill_block_super?

ntfs3 has ntfs_evict_inodes() which might depend on the info in
sbi->s_fs_info to be valid. So calling it before kill_block_super()
risks putting resources that ntfs_evict_inodes() might depend on. Doing
it in ntfs_put_super() will prevent this from becoming an issue without
having to wade through all callchains. And since we can't get rid of
ntfs_put_super() anyway why bother risking that.

      reply	other threads:[~2023-09-08 11:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 16:03 [PATCH] ntfs3: drop inode references in ntfs_put_super() Christian Brauner
2023-09-07 17:24 ` Linus Torvalds
2023-09-08  8:12 ` Christoph Hellwig
2023-09-08 11:27   ` Christian Brauner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230908-grundlos-morgig-e055946fde44@brauner \
    --to=brauner@kernel.org \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ntfs3@lists.linux.dev \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).