Message ID | 20230413095507.10620-1-xiaoshoukui@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] btrfs: ioctl: ASSERT in btrfs_exclop_balance should also check for NONE and BALANCE PAUSED status. | expand |
On Thu, Apr 13, 2023 at 05:55:07AM -0400, xiaoshoukui wrote: > Cocurrently issue add device requests, btrfs_exclop_balance in > btrfs_ioctl_add_dev can race to btrfs_exclop_finish or itself. > > Link: https://lore.kernel.org/linux-btrfs/20230324031611.98986-1-xiaoshoukui@gmail.com/ I've combined both patches into one and updated the changelog. > > --- If you write the above --- then 'git am' drops the rest until the diff, this part is meant for version-to-version changelog as you did it but it also has information that should have been in the changelog. Added to misc-next, thanks.
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a0ef1a1784c7..7df80b37bc44 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -454,7 +454,9 @@ void btrfs_exclop_balance(struct btrfs_fs_info *fs_info, case BTRFS_EXCLOP_BALANCE_PAUSED: spin_lock(&fs_info->super_lock); ASSERT(fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE || - fs_info->exclusive_operation == BTRFS_EXCLOP_DEV_ADD); + fs_info->exclusive_operation == BTRFS_EXCLOP_DEV_ADD || + fs_info->exclusive_operation == BTRFS_EXCLOP_NONE || + fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE_PAUSED); fs_info->exclusive_operation = BTRFS_EXCLOP_BALANCE_PAUSED; spin_unlock(&fs_info->super_lock); break;