mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
btrfs: remove redundant check at find_first_extent_bit_state()
The tree_search() function always returns an entry that either contains the search offset or the first entry in the tree that starts after the offset. So checking at find_first_extent_bit_state() if the returned entry ends at or after the search offset is pointless. Remove the check. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
56ec21a6dd
commit
c54c245f80
@@ -877,7 +877,7 @@ static struct extent_state *find_first_extent_bit_state(struct extent_io_tree *t
|
||||
*/
|
||||
state = tree_search(tree, start);
|
||||
while (state) {
|
||||
if (state->end >= start && (state->state & bits))
|
||||
if (state->state & bits)
|
||||
return state;
|
||||
state = next_state(state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user