aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorGravatar Filipe Manana <fdmanana@suse.com> 2023-06-30 16:03:49 +0100
committerGravatar David Sterba <dsterba@suse.com> 2023-08-21 14:52:12 +0200
commite5860f8207ed341502ecee80688cef93e367b615 (patch)
tree067d1eec30e7dc7109bb1fe3a77a0ab72d1a9c88 /fs/btrfs/volumes.c
parentbtrfs: make btrfs_destroy_pinned_extent() return void (diff)
downloadlinux-e5860f8207ed341502ecee80688cef93e367b615.tar.gz
linux-e5860f8207ed341502ecee80688cef93e367b615.tar.bz2
linux-e5860f8207ed341502ecee80688cef93e367b615.zip
btrfs: make find_first_extent_bit() return a boolean
Currently find_first_extent_bit() returns a 0 if it found a range in the given io tree and 1 if it didn't find any. There's no need to return any errors, so make the return value a boolean and invert the logic to make more sense: return true if it found a range and false if it didn't find any range. Signed-off-by: Filipe Manana <fdmanana@suse.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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f47a9c42431e..6d3aa26186a3 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1424,9 +1424,9 @@ static bool contains_pending_extent(struct btrfs_device *device, u64 *start,
lockdep_assert_held(&device->fs_info->chunk_mutex);
- if (!find_first_extent_bit(&device->alloc_state, *start,
- &physical_start, &physical_end,
- CHUNK_ALLOCATED, NULL)) {
+ if (find_first_extent_bit(&device->alloc_state, *start,
+ &physical_start, &physical_end,
+ CHUNK_ALLOCATED, NULL)) {
if (in_range(physical_start, *start, len) ||
in_range(*start, physical_start,