diff options
author | Filipe Manana <fdmanana@suse.com> | 2022-09-19 15:06:38 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-09-29 17:08:31 +0200 |
commit | 6c05813ebb5a634add71f942a21b29eb6ff09695 (patch) | |
tree | 9cd59448cadaf4160e2a742cabf7cc94da725fa1 /crypto/xcbc.c | |
parent | 08f088dd63abebb2cce5510cedd33a36bd0cf490 (diff) |
btrfs: remove unnecessary next extent map search
At __tree_search(), and its single caller __lookup_extent_mapping(), there
is no point in finding the next extent map that starts after the search
offset if we were able to find the previous extent map that ends before
our search offset, because __lookup_extent_mapping() ignores the next
acceptable extent map if we were able to find the previous one.
So just return immediately if we were able to find the previous extent
map, therefore avoiding wasting time iterating the tree looking for the
next extent map which will not be used by __lookup_extent_mapping().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'crypto/xcbc.c')
0 files changed, 0 insertions, 0 deletions