Btrfs: add missing error handling to read_tree_block

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
Filipe David Borba Manana 2013-07-31 00:39:56 +01:00 committed by Chris Mason
parent eb2067f713
commit 0f0fe8f710
1 changed files with 4 additions and 0 deletions

View File

@ -1149,6 +1149,10 @@ struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
return NULL;
ret = btree_read_extent_buffer_pages(root, buf, 0, parent_transid);
if (ret) {
free_extent_buffer(buf);
return NULL;
}
return buf;
}