btrfs: cleanup the code in lookup_extent_mapping()
PATCH 2/4 btrfs: cleanup the code in lookup_extent_mapping()
It is unnecessary to check whether the range intersects the prev extent, because the end of the prev extent must be less than or equal the start of the range to search.
This patch cleanups those unnecessary check code in lookup_extent_mapping()
Signed-off-by Miao Xie <[email protected]>
--- fs/btrfs/extent_map.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-)
fs/btrfs/extent_map.c +0 -5
@@ -330,11 +330,6 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,u64 end =range_end (start, len); rb_node =__tree_search (&tree->map, start, &prev, &next); -if (!rb_node && prev) { - em = rb_entry(prev, struct extent_map, rb_node); -if (end > em->start && start <extent_map_end (em)) - goto found; - }if (!rb_node && next) { em = rb_entry(next, struct extent_map, rb_node);if (end > em->start && start <extent_map_end (em))
Signature · 1 line
1.6.5.2