aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorFilipe Manana <[email protected]>2025-06-11 11:25:48 +0000
committerDavid Sterba <[email protected]>2025-07-21 21:58:02 +0000
commit790b88c4dd3b5cf28a52280c1c5d10865266f0a5 (patch)
tree414ff3f5cd99ab1fc3bc01ec5850b7a59b25cc3b /fs/btrfs/extent_io.c
parentbtrfs: remove pointless out label from update_free_space_extent_count() (diff)
downloadkernel-790b88c4dd3b5cf28a52280c1c5d10865266f0a5.tar.gz
kernel-790b88c4dd3b5cf28a52280c1c5d10865266f0a5.zip
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 <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 3628bd504e37..1a56fb258204 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4106,8 +4106,8 @@ static inline void eb_bitmap_offset(const struct extent_buffer *eb,
* @start: offset of the bitmap item in the extent buffer
* @nr: bit number to test
*/
-int extent_buffer_test_bit(const struct extent_buffer *eb, unsigned long start,
- unsigned long nr)
+bool extent_buffer_test_bit(const struct extent_buffer *eb, unsigned long start,
+ unsigned long nr)
{
unsigned long i;
size_t offset;