btrfs-progs: check: use add_extent_rec_nolookup after lookups

The lookup was duplicated, use the helper that does not do it.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2016-04-01 14:45:33 +02:00
parent e1a5ecc206
commit 5f8cd780b9

View File

@ -4692,7 +4692,7 @@ static int add_tree_backref(struct cache_tree *extent_cache, u64 bytenr,
cache = lookup_cache_extent(extent_cache, bytenr, 1); cache = lookup_cache_extent(extent_cache, bytenr, 1);
if (!cache) { if (!cache) {
add_extent_rec(extent_cache, NULL, 0, bytenr, add_extent_rec_nolookup(extent_cache, NULL, 0, bytenr,
1, 0, 0, 0, 0, 1, 0, 0); 1, 0, 0, 0, 0, 1, 0, 0);
cache = lookup_cache_extent(extent_cache, bytenr, 1); cache = lookup_cache_extent(extent_cache, bytenr, 1);
if (!cache) if (!cache)
@ -4744,8 +4744,8 @@ static int add_data_backref(struct cache_tree *extent_cache, u64 bytenr,
cache = lookup_cache_extent(extent_cache, bytenr, 1); cache = lookup_cache_extent(extent_cache, bytenr, 1);
if (!cache) { if (!cache) {
add_extent_rec(extent_cache, NULL, 0, bytenr, 1, 0, 0, 0, 0, add_extent_rec_nolookup(extent_cache, NULL, 0, bytenr, 1, 0, 0,
0, 0, max_size); 0, 0, 0, 0, max_size);
cache = lookup_cache_extent(extent_cache, bytenr, 1); cache = lookup_cache_extent(extent_cache, bytenr, 1);
if (!cache) if (!cache)
abort(); abort();