From: chandan <chandan@linux.vnet.ibm.com>
To: linux-btrfs@vger.kernel.org
Cc: chandra.seetharaman@us.ibm.com
Subject: [PATCH] btrfs-progs: btrfs_setup_chunk_tree_and_device_map: Return -EIO on error.
Date: Thu, 05 Sep 2013 11:21:30 +0530 [thread overview]
Message-ID: <1748503.OfecYaovVX@localhost.localdomain> (raw)
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>
---
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
reply other threads:[~2013-09-05 5:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1748503.OfecYaovVX@localhost.localdomain \
--to=chandan@linux.vnet.ibm.com \
--cc=chandra.seetharaman@us.ibm.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).