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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 4a8961cf4..2b1c88c3c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -517,6 +517,11 @@ gd_sync_task_begin (dict_t *op_ctx, rpcsvc_request_t * req)
/* successful lock in local node */
local_locked = _gf_true;
+ /* storing op globally to access in synctask code paths
+ * This is still acceptable, as we are performing this under
+ * the 'cluster' lock*/
+
+ glusterd_op_set_op (op);
INIT_LIST_HEAD (&conf->xaction_peers);
list_for_each_entry (peerinfo, &conf->peers, uuid_list) {
if (!peerinfo->connected)
@@ -628,6 +633,7 @@ out:
/* Local node should be the one to be locked first,
unlocked last to prevent races */
+ glusterd_op_clear_op (op);
glusterd_unlock (MY_UUID);
}