diff options
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-write.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index f83fc34ed..10ab2145d 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -137,19 +137,18 @@ afr_create_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, if (afr_fop_failed (op_ret, op_errno)) afr_transaction_fop_failed (frame, this, child_index); - ret = afr_fd_ctx_set (this, fd); + if (op_ret != -1) { + local->op_ret = op_ret; - if (ret < 0) { - gf_log (this->name, GF_LOG_DEBUG, - "could not set ctx on fd=%p", fd); + ret = afr_fd_ctx_set (this, fd); - local->op_ret = -1; - local->op_errno = -ret; - } + if (ret < 0) { + gf_log (this->name, GF_LOG_DEBUG, + "could not set ctx on fd=%p", fd); - - if (op_ret != -1) { - local->op_ret = op_ret; + local->op_ret = -1; + local->op_errno = -ret; + } if (local->success_count == 0) { local->cont.create.buf = *buf; |