From 7fc38ce7783891218a0cb83d233d579e64831e33 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 26 Aug 2010 11:42:24 +0000 Subject: mgmt/glusterd: free op ctx only if it is allocated Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1236 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1236 --- xlators/mgmt/glusterd/src/glusterd-op-sm.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h index afb134637..d72ecadd2 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h @@ -118,6 +118,7 @@ struct glusterd_op_info_ { int32_t op_errno; pthread_mutex_t lock; int32_t cli_op; + gf_boolean_t ctx_free[GD_OP_MAX]; }; typedef struct glusterd_op_info_ glusterd_op_info_t; @@ -216,4 +217,12 @@ glusterd_op_clear_ctx (glusterd_op_t op); int32_t glusterd_opinfo_unlock(); +int32_t +glusterd_op_set_ctx_free (glusterd_op_t op, gf_boolean_t ctx_free); + +int32_t +glusterd_op_clear_ctx_free (glusterd_op_t op); + +gf_boolean_t +glusterd_op_get_ctx_free (glusterd_op_t op); #endif -- cgit