diff options
author | Ravishankar N <ravishankar@redhat.com> | 2016-12-05 21:14:57 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-12-21 00:57:41 -0800 |
commit | d92a438350cc30d9961c29fcc696c449790490e4 (patch) | |
tree | 5e80b61682ca3a8b58609be492a58293fc6930de /xlators | |
parent | 5bc916bab68bbb1fe7eac4ffaca5b1e3951cc5ad (diff) |
afr: fix bug in passing child index in afr_inode_write_fill
Backport of: http://review.gluster.org/16029
Change-Id: I2589aab4b781cc7b50c93f33c8dc51036dbf82f8
BUG: 1402212
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/16100
Tested-by: Krutika Dhananjay <kdhananj@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 7 |
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 f40df5c8ea3..4651c27ce5c 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -1261,7 +1261,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; priv = this->private; @@ -1280,11 +1279,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, |