diff options
author | David Sterba <dsterba@suse.com> | 2020-08-14 12:35:16 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-10-12 17:44:14 +0300 |
commit | 893fe2439994666d94dbe19f5fd59cec17c8f0a8 (patch) | |
tree | 0dd3b9b5b44e010253b14cebf417bf55b18f949e /fs/btrfs/relocation.c | |
parent | 99be1a66e1fe6c62fbd7c1b0c50ea38c33ffdd5a (diff) | |
download | linux-893fe2439994666d94dbe19f5fd59cec17c8f0a8.tar.xz |
btrfs: change test_range_bit to scan the whole range
The semantics of test_range_bit() with filled == 0 is now in it's own
helper so test_range_bit will check the whole range unconditionally.
The detection logic is flipped and assumes success by default and
catches exceptions.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index a759d30a5ceb..a896f22e138b 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2631,7 +2631,7 @@ static int tree_block_processed(u64 bytenr, struct reloc_control *rc) u32 blocksize = rc->extent_root->fs_info->nodesize; if (test_range_bit(&rc->processed_blocks, bytenr, - bytenr + blocksize - 1, EXTENT_DIRTY, 1, NULL)) + bytenr + blocksize - 1, EXTENT_DIRTY, NULL)) return 1; return 0; } |