summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-syncop.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-syncop.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 5730dc48a41..68720bdda9c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -809,9 +809,7 @@ commit_done:
gf_asprintf (op_errstr, OPERRSTR_COMMIT_FAIL,
hostname);
goto out;
- } else {
- glusterd_op_modify_op_ctx (op, op_ctx);
- }
+ }
if (!npeers) {
ret = 0;
@@ -832,6 +830,9 @@ commit_done:
*op_errstr = gf_strdup (errstr);
out:
+ if (!ret)
+ glusterd_op_modify_op_ctx (op, op_ctx);
+
if (rsp_dict)
dict_unref (rsp_dict);
return ret;