btrfs-progs: btrfs_setup_chunk_tree_and_device_map: Return -EIO on error.

As a result of a successful call to btrfs_read_sys_array(), the 'ret'
variable is already set to 0. Hence the function would return 0 even
if the call to read_tree_block() fails.

Signed-off-by: chandan <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
master
chandan 2013-09-05 11:21:30 +05:30 committed by Chris Mason
parent 1c87a95bfc
commit 7c9074422a
1 changed files with 1 additions and 1 deletions

View File

@ -966,7 +966,7 @@ int btrfs_setup_chunk_tree_and_device_map(struct btrfs_fs_info *fs_info)
if (!fs_info->chunk_root->node ||
!extent_buffer_uptodate(fs_info->chunk_root->node)) {
fprintf(stderr, "Couldn't read chunk root\n");
return ret;
return -EIO;
}
if (!(btrfs_super_flags(sb) & BTRFS_SUPER_FLAG_METADUMP)) {