diff options
author | 2018-09-21 15:20:30 +0800 | |
---|---|---|
committer | 2018-10-15 17:23:40 +0200 | |
commit | 06bbf67244fc63c66340bd31f4b2b60d797e886e (patch) | |
tree | e7ebf65f5c5f8059b006d5c778d7840a989c7219 /fs/btrfs | |
parent | btrfs: relocation: Cleanup while loop using rbtree_postorder_for_each_entry_safe (diff) | |
download | linux-06bbf67244fc63c66340bd31f4b2b60d797e886e.tar.gz linux-06bbf67244fc63c66340bd31f4b2b60d797e886e.tar.bz2 linux-06bbf67244fc63c66340bd31f4b2b60d797e886e.zip |
btrfs: relocation: Remove redundant tree level check
Commit 581c1760415c ("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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/relocation.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 0c1bc7df06a2..924116f654a1 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -2915,7 +2915,6 @@ static int get_tree_block_key(struct btrfs_fs_info *fs_info, free_extent_buffer(eb); return -EIO; } - WARN_ON(btrfs_header_level(eb) != block->level); if (block->level == 0) btrfs_item_key_to_cpu(eb, &block->key, 0); else |