summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-open.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/afr/src/afr-open.c')
-rw-r--r--xlators/cluster/afr/src/afr-open.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index dc830f7d59d..69bbb56b8d0 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -100,21 +100,23 @@ afr_open_cbk (call_frame_t *frame, void *cookie,
ret = afr_fd_ctx_set (this, fd);
if (ret < 0) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_ERROR,
"could not set fd ctx for fd=%p",
fd);
local->op_ret = -1;
local->op_errno = -ret;
+ goto unlock;
}
ret = fd_ctx_get (fd, this, &ctx);
if (ret < 0) {
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_ERROR,
"could not get fd ctx for fd=%p", fd);
local->op_ret = -1;
local->op_errno = -ret;
+ goto unlock;
}
fd_ctx = (afr_fd_ctx_t *)(long) ctx;
@@ -124,6 +126,7 @@ afr_open_cbk (call_frame_t *frame, void *cookie,
fd_ctx->wbflags = local->cont.open.wbflags;
}
}
+unlock:
UNLOCK (&frame->lock);
call_count = afr_frame_return (frame);