[PATCH 0/3] Move fscrypt keyring destruction to after ->put_super

2023-12-12 Thread Eric Biggers
This series moves the fscrypt keyring destruction to after ->put_super, as this will be needed by the btrfs fscrypt support. To make this possible, it also changes btrfs and f2fs to release their block devices after generic_shutdown_super() rather than before. This supersedes "[PATCH] fscrypt: mo

[PATCH 2/3] f2fs: move release of block devices to after kill_block_super()

2023-12-12 Thread Eric Biggers
From: Eric Biggers Call destroy_device_list() and free the f2fs_sb_info from kill_f2fs_super(), after the call to kill_block_super(). This is necessary to order it after the call to fscrypt_destroy_keyring() once generic_shutdown_super() starts calling fscrypt_destroy_keyring() just after callin

[PATCH 1/3] btrfs: call btrfs_close_devices from ->kill_sb

2023-12-12 Thread Eric Biggers
From: Christoph Hellwig blkdev_put must not be called under sb->s_umount to avoid a lock order reversal with disk->open_mutex once call backs from block devices to the file system using the holder ops are supported. Move the call to btrfs_close_devices into btrfs_free_fs_info so that it is close

[PATCH 3/3] fs: move fscrypt keyring destruction to after ->put_super

2023-12-12 Thread Eric Biggers
From: Josef Bacik btrfs has a variety of asynchronous things we do with inodes that can potentially last until ->put_super, when we shut everything down and clean up all of our async work. Due to this we need to move fscrypt_destroy_keyring() to after ->put_super, otherwise we get warnings about