btrfs: make btrfs_find_contiguous_extent_bit() return bool instead of int
authorFilipe Manana <fdmanana@suse.com>
Mon, 7 Apr 2025 11:15:25 +0000 (12:15 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:44 +0000 (14:30 +0200)
commit9d072bfab534b8a4ba2f75ea5aca70c325832c46
treeb619d5b585877a4fbfe41a5ff678b952cb6502f1
parent00ba32e5be977fc156fa5a2e5bdf6d1f6570452f
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>
fs/btrfs/extent-io-tree.c
fs/btrfs/extent-io-tree.h
fs/btrfs/file-item.c