btrfs: make extent_buffer_test_bit() return a boolean instead
authorFilipe Manana <fdmanana@suse.com>
Wed, 11 Jun 2025 11:25:48 +0000 (12:25 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:58:02 +0000 (23:58 +0200)
commit790b88c4dd3b5cf28a52280c1c5d10865266f0a5
tree414ff3f5cd99ab1fc3bc01ec5850b7a59b25cc3b
parente4e5fcbc62d0105e26b06375b62cf1a2cb54d7b6
btrfs: make extent_buffer_test_bit() return a boolean instead

All the callers want is to determine if a bit is set and all of them call
the function and do a double negation (!!) on its result to get a boolean.
So change it to return a boolean and simplify callers.

Reviewed-by: Boris Burkov <boris@bur.io>
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.c
fs/btrfs/extent_io.h
fs/btrfs/free-space-tree.c
fs/btrfs/tests/extent-io-tests.c