mirror of
https://github.com/kdave/btrfs-progs
synced 2025-05-16 23:08:38 +00:00
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:
parent
e1a5ecc206
commit
5f8cd780b9
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user