diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 0e5a15092bf..b9cd6884181 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -3589,11 +3589,10 @@ afr_flush_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret, } else { local->op_errno = op_errno; } + call_count = --local->call_count; } UNLOCK(&frame->lock); - call_count = afr_frame_return(frame); - if (call_count == 0) AFR_STACK_UNWIND(flush, frame, local->op_ret, local->op_errno, local->xdata_rsp); @@ -3729,11 +3728,10 @@ afr_fsyncdir_cbk(call_frame_t *frame, void *cookie, xlator_t *this, } else { local->op_errno = op_errno; } + call_count = --local->call_count; } UNLOCK(&frame->lock); - call_count = afr_frame_return(frame); - if (call_count == 0) AFR_STACK_UNWIND(fsyncdir, frame, local->op_ret, local->op_errno, local->xdata_rsp); @@ -4350,10 +4348,10 @@ afr_statfs_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, int call_count = 0; struct statvfs *buf = NULL; + local = frame->local; + LOCK(&frame->lock); { - local = frame->local; - if (op_ret != 0) { local->op_errno = op_errno; goto unlock; @@ -4379,10 +4377,9 @@ afr_statfs_cbk(call_frame_t *frame, void *cookie, xlator_t *this, int op_ret, } } unlock: + call_count = --local->call_count; UNLOCK(&frame->lock); - call_count = afr_frame_return(frame); - if (call_count == 0) AFR_STACK_UNWIND(statfs, frame, local->op_ret, local->op_errno, &local->cont.statfs.buf, local->xdata_rsp); |