From 582de0677da4be19fc6f873625c58c45d069ab1c Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 22 Apr 2010 13:33:09 +0000 Subject: Memory accounting changes Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their contributions. Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329 --- xlators/features/locks/src/inodelk.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'xlators/features/locks/src/inodelk.c') diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index 50a5996d74a..64028d079c3 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -42,7 +42,7 @@ __delete_inode_lock (pl_inode_lock_t *lock) void __destroy_inode_lock (pl_inode_lock_t *lock) { - FREE (lock); + GF_FREE (lock); } /* Check if 2 inodelks are conflicting on type. Only 2 shared locks don't conflict */ @@ -439,7 +439,7 @@ release_inode_locks_of_transport (xlator_t *this, pl_dom_list_t *dom, } unlock: if (path) - FREE (path); + GF_FREE (path); pthread_mutex_unlock (&pinode->mutex); @@ -447,7 +447,7 @@ unlock: list_del_init (&l->blocked_locks); STACK_UNWIND_STRICT (inodelk, l->frame, -1, EAGAIN); - FREE (l); + GF_FREE (l); } grant_blocked_inode_locks (this, pinode, dom); @@ -515,7 +515,8 @@ new_inode_lock (struct flock *flock, transport_t *transport, pid_t client_pid, { pl_inode_lock_t *lock = NULL; - lock = CALLOC (1, sizeof (*lock)); + lock = GF_CALLOC (1, sizeof (*lock), + gf_locks_mt_pl_inode_lock_t); if (!lock) { return NULL; } -- cgit