mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 10:04:12 +08:00
btrfs: relocation: Remove redundant tree level check
Commit 581c176041
("btrfs: Validate child tree block's level and first
key") has made tree block level check mandatory.
So if tree block level doesn't match, we won't get a valid extent
buffer. The extra WARN_ON() check can be removed completely.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
98ff7b94e4
commit
06bbf67244
@ -2915,7 +2915,6 @@ static int get_tree_block_key(struct btrfs_fs_info *fs_info,
|
|||||||
free_extent_buffer(eb);
|
free_extent_buffer(eb);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
WARN_ON(btrfs_header_level(eb) != block->level);
|
|
||||||
if (block->level == 0)
|
if (block->level == 0)
|
||||||
btrfs_item_key_to_cpu(eb, &block->key, 0);
|
btrfs_item_key_to_cpu(eb, &block->key, 0);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user