summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2016-12-05 21:14:57 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-12-06 04:12:00 -0800
commitca13525a5de8db745878c4cdf89a45b76a9e62c6 (patch)
tree2f45ca55187bd9d134fa2cb79771459d6633145b /xlators/cluster/afr
parentaa22f24f5db7659387704998ae01520708869873 (diff)
afr: fix bug in passing child index in afr_inode_write_fill
Change-Id: I7b70de317a5f15a3bf483ffe40b971143deddc11 BUG: 1401218 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/16029 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index bedc4069f09..6bfe249d4eb 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -1250,7 +1250,6 @@ afr_pre_op_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
compound_args_cbk_t *args_cbk = data;
int call_count = -1;
int child_index = -1;
- int i = 0;
local = frame->local;
child_index = (long) cookie;
@@ -1268,11 +1267,11 @@ afr_pre_op_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
* Handle that case by passing the op_ret, op_errno values explicitly.
*/
if ((op_ret == -1) && (args_cbk == NULL)) {
- afr_inode_write_fill (frame, this, (long) i, op_ret, op_errno,
- NULL, NULL, NULL);
+ afr_inode_write_fill (frame, this, child_index, op_ret,
+ op_errno, NULL, NULL, NULL);
} else {
write_args_cbk = &args_cbk->rsp_list[1];
- afr_inode_write_fill (frame, this, (long) child_index,
+ afr_inode_write_fill (frame, this, child_index,
write_args_cbk->op_ret,
write_args_cbk->op_errno,
&write_args_cbk->prestat,