summaryrefslogtreecommitdiff
path: root/disk-io.c
diff options
context:
space:
mode:
authorchandan <chandan@linux.vnet.ibm.com>2013-09-05 11:21:30 +0530
committerChris Mason <chris.mason@fusionio.com>2013-10-16 08:20:42 -0400
commit7c9074422aedb10d56b3db74041f06fd43951577 (patch)
tree473602545cc92ec8af08daef822a0d45f99cb7bb /disk-io.c
parent1c87a95bfc5014f3c47c7f64f636375774be079b (diff)
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>
Diffstat (limited to 'disk-io.c')
-rw-r--r--disk-io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-io.c b/disk-io.c
index fec77002..0f69f0f9 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -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)) {