diff options
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 5e636d8dcc5..73dd50f67eb 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -165,8 +165,10 @@ __mark_pre_op_undone_on_fd (call_frame_t *frame, xlator_t *this, int child_index LOCK (&local->fd->lock); { - if (local->transaction.type == AFR_DATA_TRANSACTION) + if (local->transaction.type == AFR_DATA_TRANSACTION) { + GF_ASSERT (fd_ctx->pre_op_done[child_index]); fd_ctx->pre_op_done[child_index]--; + } } UNLOCK (&local->fd->lock); out: @@ -655,7 +657,9 @@ afr_changelog_post_op_now (call_frame_t *frame, xlator_t *this) afr_changelog_post_op_cbk (frame, (void *)(long)i, this, 1, 0, xattr[i], NULL); } else { - __mark_pre_op_undone_on_fd (frame, this, i); + if (!piggyback) + __mark_pre_op_undone_on_fd (frame, this, + i); STACK_WIND_COOKIE (frame, afr_changelog_post_op_cbk, (void *) (long) i, |