summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syncop.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2015-07-01 22:32:44 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-07-08 22:00:26 -0700
commitcd059fb2bf00f5fcb72dac2379db34a5622f1d08 (patch)
tree9882d0273ce42c6e0e4c90ef78971e6bc6022462 /libglusterfs/src/syncop.c
parenta2e041458cbdf7b758e1af5d1e0c897f34bbc7c0 (diff)
libglusterfs: Use GF_CALLOC/GF_FREE instead of CALLOC/FREE
- Also removed numbers for the types as the string form of type is printed in statedump now, so the numbers are not needed anymore. >Change-Id: I6e8c15a1dc8cb6187842f96f1d46ec0f26a602b4 >BUG: 1237381 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/11495 >Tested-by: Gluster Build System <jenkins@build.gluster.com> >Tested-by: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Vijay Bellur <vbellur@redhat.com> >(cherry picked from commit e7f2547f89dbcd90cdb3714f63620a36bdc2ef3a) Change-Id: I60dbe14ba0c9855982e235001ee86747e3fa87a0 BUG: 1238476 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11501 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'libglusterfs/src/syncop.c')
-rw-r--r--libglusterfs/src/syncop.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index 3df1bef1610..c3b0efea7d2 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -388,7 +388,7 @@ synctask_destroy (struct synctask *task)
if (!task)
return;
- FREE (task->stack);
+ GF_FREE (task->stack);
if (task->opframe)
STACK_DESTROY (task->opframe->root);
@@ -398,7 +398,7 @@ synctask_destroy (struct synctask *task)
pthread_cond_destroy (&task->cond);
}
- FREE (task);
+ GF_FREE (task);
}
@@ -460,7 +460,7 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,
if (destroymode)
return NULL;
- newtask = CALLOC (1, sizeof (*newtask));
+ newtask = GF_CALLOC (1, sizeof (*newtask), gf_common_mt_synctask);
if (!newtask)
return NULL;
@@ -494,7 +494,7 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,
goto err;
}
- newtask->stack = CALLOC (1, env->stacksize);
+ newtask->stack = GF_CALLOC (1, env->stacksize, gf_common_mt_syncstack);
if (!newtask->stack) {
gf_log ("syncop", GF_LOG_ERROR,
"out of memory for stack");
@@ -526,10 +526,10 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,
return newtask;
err:
if (newtask) {
- FREE (newtask->stack);
+ GF_FREE (newtask->stack);
if (newtask->opframe)
STACK_DESTROY (newtask->opframe->root);
- FREE (newtask);
+ GF_FREE (newtask);
}
return NULL;
@@ -772,7 +772,7 @@ syncenv_destroy (struct syncenv *env)
pthread_mutex_destroy (&env->mutex);
pthread_cond_destroy (&env->cond);
- FREE (env);
+ GF_FREE (env);
return;
}
@@ -793,7 +793,7 @@ syncenv_new (size_t stacksize, int procmin, int procmax)
if (procmin > procmax)
return NULL;
- newenv = CALLOC (1, sizeof (*newenv));
+ newenv = GF_CALLOC (1, sizeof (*newenv), gf_common_mt_syncenv);
if (!newenv)
return NULL;