Message ID | bcee10b1dcf4b6d350d0b135256860bd63c22dc8.1743604119.git.fdmanana@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | btrfs: some more cleanups for the io tree code | expand |
diff --git a/fs/btrfs/extent-io-tree.c b/fs/btrfs/extent-io-tree.c index b321f826d008..d833ab2d69a1 100644 --- a/fs/btrfs/extent-io-tree.c +++ b/fs/btrfs/extent-io-tree.c @@ -1794,6 +1794,7 @@ bool test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, u32 bit, bool bitset = true; ASSERT(is_power_of_2(bit)); + ASSERT(start < end); spin_lock(&tree->lock); if (cached && extent_state_in_tree(cached) && cached->start <= start && @@ -1807,9 +1808,6 @@ bool test_range_bit(struct extent_io_tree *tree, u64 start, u64 end, u32 bit, break; } - if (state->start > end) - break; - if ((state->state & bit) == 0) { bitset = false; break;