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@xxxxxxxxxxxxxxxxxx>
---
disk-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/disk-io.c b/disk-io.c
index fec7700..0f69f0f 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)) {
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html