diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-07-15 15:45:25 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-26 12:27:54 +0200 |
commit | 9283b9e09a6d4c0150c33b5674d5071234218c99 (patch) | |
tree | 03cf1e7cc25df6d5bbf8369c9af4fd2c410e811a /fs/btrfs/volumes.c | |
parent | 3349b57fd47b5de10936bd8928db546b20c9fb91 (diff) | |
download | linux-9283b9e09a6d4c0150c33b5674d5071234218c99.tar.bz2 |
btrfs: remove lock protection for BLOCK_GROUP_FLAG_TO_COPY
We use this during device replace for zoned devices, we were simply
taking the lock because it was in a bit field and we needed the lock to
be safe with other modifications in the bitfield. With the bit helpers
we no longer require that locking.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index fcde4f085cb6..4d03d2f47dc3 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6153,9 +6153,7 @@ static bool is_block_group_to_copy(struct btrfs_fs_info *fs_info, u64 logical) cache = btrfs_lookup_block_group(fs_info, logical); - spin_lock(&cache->lock); ret = test_bit(BLOCK_GROUP_FLAG_TO_COPY, &cache->runtime_flags); - spin_unlock(&cache->lock); btrfs_put_block_group(cache); return ret; |