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.