On Wed, Jul 22, 2020 at 06:00:39PM +0900, Johannes Thumshirn wrote: > When we're (re)mounting a btrfs filesystem we set the > BTRFS_FS_STATE_REMOUNTING state in fs_info to serialize against async > reclaim or defrags. > > This flag is set in btrfs_remount_prepare() called by btrfs_remount(). As > btrfs_remount_prepare() does nothing but setting this flag and doesn't > have a second caller, we can just open-code the flag setting in > btrfs_remount(). Agreed, that's too trivial and set_bit of state flags are commonly used. I'd suggest to also lift the clear_bit counterpart from btrfs_remount_cleanup and move it right after it in btrfs_remount, so we have both set/clear in one function. The original idea was probably to have prepare/cleanup wrapped but I don't see much value to have the trivial wrapper.
