btrfs: Remove impossible BUG_ON in get_tree_block_key
PATCH 1/1 btrfs: Remove impossible BUG_ON in get_tree_block_key
relocate_tree_blocks calls get_tree_block_key for a block iff that block has its ->key_ready equal false. Thus the BUG_ON in the latter function cannot ever be triggered so remove it.
Signed-off-by Nikolay Borisov <[email protected]>
--- fs/btrfs/relocation.c | 1 - 1 file changed, 1 deletion(-)
fs/btrfs/relocation.c +0 -1
@@ -3020,7 +3020,6 @@ static int get_tree_block_key(struct btrfs_fs_info *fs_info, {struct extent_buffer *eb; -BUG_ON (block->key_ready); eb =read_tree_block (fs_info, block->bytenr, block->key.offset, block->level,NULL );if (IS_ERR (eb)) {
Signature · 1 line
2.17.1
Quoted 5 lines · Nikolay Borisov
relocate_tree_blockscallsget_tree_block_keyfor a block iff that block has its ->key_ready equal false. Thus theBUG_ONin the latter function cannot ever be triggered so remove it.Signed-off-by Nikolay Borisov <[email protected]>
Reviewed-by Josef Bacik <[email protected]>
Thanks,
Josef
Quoted 5 lines · Nikolay Borisov
relocate_tree_blockscallsget_tree_block_keyfor a block iff that block has its ->key_ready equal false. Thus theBUG_ONin the latter function cannot ever be triggered so remove it.Signed-off-by Nikolay Borisov <[email protected]>
Added to misc-next, thanks.