mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
btrfs: assert block group is locked in btrfs_use_block_group_size_class()
It's supposed to be called with the block group locked, in order to read and set its size_class member, so assert it's locked. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
0bf63d385f
commit
954f3217f6
|
|
@ -4755,6 +4755,7 @@ int btrfs_use_block_group_size_class(struct btrfs_block_group *bg,
|
|||
enum btrfs_block_group_size_class size_class,
|
||||
bool force_wrong_size_class)
|
||||
{
|
||||
lockdep_assert_held(&bg->lock);
|
||||
ASSERT(size_class != BTRFS_BG_SZ_NONE);
|
||||
|
||||
/* The new allocation is in the right size class, do nothing */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user