Skip to content

Commit

Permalink
btrfs: remove lock protection for BLOCK_GROUP_FLAG_RELOCATING_REPAIR
Browse files Browse the repository at this point in the history
Before when this was modifying the bit field we had to protect it with
the bg->lock, however now we're using bit helpers so we can stop
using the bg->lock.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Josef Bacik authored and David Sterba committed Sep 26, 2022
1 parent 7b9c293 commit 588a486
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -8279,13 +8279,10 @@ bool btrfs_repair_one_zone(struct btrfs_fs_info *fs_info, u64 logical)
if (!cache)
return true;

spin_lock(&cache->lock);
if (test_and_set_bit(BLOCK_GROUP_FLAG_RELOCATING_REPAIR, &cache->runtime_flags)) {
spin_unlock(&cache->lock);
btrfs_put_block_group(cache);
return true;
}
spin_unlock(&cache->lock);

kthread_run(relocating_repair_kthread, cache,
"btrfs-relocating-repair");
Expand Down

0 comments on commit 588a486

Please sign in to comment.