diff options
author | Avra Sengupta <asengupt@redhat.com> | 2014-01-17 05:51:17 +0000 |
---|---|---|
committer | Avra Sengupta <asengupt@redhat.com> | 2014-01-21 02:09:28 +0000 |
commit | 56b8ed7592e53226e356bced53147d365c5024e6 (patch) | |
tree | d66b54d2fe8fa8008716c08656f57559a82130ba /xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c | |
parent | 44be8c36ac764a652b8575b0e3115c0b88c1c50f (diff) |
glusterd/vol-locks: Dict_ref while adding req_ctx->dict to txn_opinfos
Introducing a wrapper function glusterd_txn_opinfo_init(),
to initialize the opinfo to be set in the txn_id engine.
Removed glusterd_op_fini_ctx() as the txn opinfo should
only be cleared by glusterd_clear_txn_opinfo().
Change-Id: I17e85a162d6a3bca79941f8603d0c2b579f0d194
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c index 2ebe372cc..f4ecc486f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c @@ -108,14 +108,15 @@ glusterd_op_state_machine_volume_lock (rpcsvc_request_t *req, GF_ASSERT (this); GF_ASSERT (req); - txn_op_info.op = lock_req->op; - txn_op_info.op_ctx = ctx->dict; - txn_op_info.req = req; + glusterd_txn_opinfo_init (&txn_op_info, NULL, &lock_req->op, + ctx->dict, req); ret = glusterd_set_txn_opinfo (&lock_req->txn_id, &txn_op_info); if (ret) { gf_log (this->name, GF_LOG_ERROR, "Unable to set transaction's opinfo"); + if (ctx->dict) + dict_unref (ctx->dict); goto out; } |