summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2014-02-01 22:49:22 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-04 09:50:12 -0800
commit797c62eb56797189b51a1dcb35009499f920a3ea (patch)
treedcff0be7e374b4910fbfe39f8b006f9f1b94f9a0 /xlators/mgmt
parentab8050448680f0c3f7e2bf670501926ca11764cf (diff)
glusterd: Reset opinfo.op ONLY if lock succeeded
Change-Id: I0244a7f61a826b32f4c2dfe51e246f2593a38211 BUG: 1060434 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6885 Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index c975d01..c9a1b5a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -1099,9 +1099,11 @@ gd_unlock_op_phase (struct list_head *peers, glusterd_op_t op, int op_ret,
out:
glusterd_op_send_cli_response (op, op_ret, 0, req, op_ctx, op_errstr);
- glusterd_op_clear_op (op);
- if (is_locked)
+ /* Unlock and reset opinfo.op ONLY if lock ever succeeded! */
+ if (is_locked) {
+ glusterd_op_clear_op (op);
glusterd_unlock (MY_UUID);
+ }
return 0;
}