summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-10-02 02:14:07 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-10-02 06:29:54 -0700
commit0ac18907614886fa00858b6a1abfeb099b49348a (patch)
treed6e49588321e1ad7cdbd83e9e880846d67d3c0a9 /libglusterfs
parent365c814f7ba4cc8e04959927c3ded9cdd5b2ab24 (diff)
Replace assert in mem_put with gf_log_callingfn
Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1759 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1759
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/mem-pool.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index 3df317a5ca6..f266ce61f3b 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -460,7 +460,12 @@ mem_put (struct mem_pool *pool, void *ptr)
case 1:
list = head = mem_pool_ptr2chunkhead (ptr);
in_use = (head + GF_MEM_POOL_LIST_BOUNDARY);
- GF_ASSERT (is_mem_chunk_in_use(in_use));
+ if (!is_mem_chunk_in_use(in_use)) {
+ gf_log_callingfn ("mem-pool", GF_LOG_CRITICAL,
+ "mem_put called on freed ptr %p of mem "
+ "pool %p", ptr, pool);
+ break;
+ }
pool->hot_count--;
pool->cold_count++;
*in_use = 0;