diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-03-13 17:33:34 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-05-16 00:43:28 -0700 |
commit | 74fbeb2d1a997a0238aa15ab2dccc98764b667a2 (patch) | |
tree | 35c98acd32bc812149d8b40ace0dc33e26d06cbd /xlators/cluster/afr/src | |
parent | 27ae1677eb2a6ed4a04bda0df5cc92f2780c11ed (diff) |
cluster/afr: Return EIO if read-child < 0 in inode-read fops
Change-Id: I8fb2369caffae8f295774b8b12a086c66ec714c7
BUG: 800884
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3332
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index efdf385fdb1..9b6c36fb077 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -670,8 +670,11 @@ afr_get_call_child (xlator_t *this, unsigned char *child_up, int32_t read_child, GF_ASSERT (call_child); GF_ASSERT (last_index); GF_ASSERT (fresh_children); - GF_ASSERT (read_child >= 0); + if (read_child < 0) { + ret = -EIO; + goto out; + } priv = this->private; *call_child = -1; *last_index = -1; |