diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-04-07 12:15:25 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-05-15 14:30:44 +0200 |
| commit | 9d072bfab534b8a4ba2f75ea5aca70c325832c46 (patch) | |
| tree | b619d5b585877a4fbfe41a5ff678b952cb6502f1 /fs/btrfs/extent-io-tree.h | |
| parent | 00ba32e5be977fc156fa5a2e5bdf6d1f6570452f (diff) | |
btrfs: make btrfs_find_contiguous_extent_bit() return bool instead of int
The function needs only to return true or false, so there's no need to
return an integer. Currently it returns 0 when a range with the given
bits is set and 1 when not found, which is a bit counter intuitive too.
So change the function to return a bool instead, returning true when a
range is found and false otherwise. Update the function's documentation
to mention the return value too.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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/extent-io-tree.h')
| -rw-r--r-- | fs/btrfs/extent-io-tree.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h index 625f4cd3debd..d8c01d857667 100644 --- a/fs/btrfs/extent-io-tree.h +++ b/fs/btrfs/extent-io-tree.h @@ -219,8 +219,8 @@ bool btrfs_find_first_extent_bit(struct extent_io_tree *tree, u64 start, struct extent_state **cached_state); void btrfs_find_first_clear_extent_bit(struct extent_io_tree *tree, u64 start, u64 *start_ret, u64 *end_ret, u32 bits); -int btrfs_find_contiguous_extent_bit(struct extent_io_tree *tree, u64 start, - u64 *start_ret, u64 *end_ret, u32 bits); +bool btrfs_find_contiguous_extent_bit(struct extent_io_tree *tree, u64 start, + u64 *start_ret, u64 *end_ret, u32 bits); bool btrfs_find_delalloc_range(struct extent_io_tree *tree, u64 *start, u64 *end, u64 max_bytes, struct extent_state **cached_state); |