Commit 06bbf672 authored by Qu Wenruo's avatar Qu Wenruo Committed by David Sterba
Browse files

btrfs: relocation: Remove redundant tree level check

Commit 581c1760

 ("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: default avatarNikolay Borisov <>
Signed-off-by: default avatarQu Wenruo <>
Reviewed-by: default avatarDavid Sterba <>
Signed-off-by: default avatarDavid Sterba <>
parent 98ff7b94
......@@ -2915,7 +2915,6 @@ static int get_tree_block_key(struct btrfs_fs_info *fs_info,
return -EIO;
WARN_ON(btrfs_header_level(eb) != block->level);
if (block->level == 0)
btrfs_item_key_to_cpu(eb, &block->key, 0);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment