From f75277b12af4c7e72c448480feec0d0e2e6582cd Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 7 Mar 2012 17:48:12 +0530 Subject: features/locks: Make inodelk ref-counted Ref when the object is allocated. Unref after the response is submitted to that inodelk. Ref when the lock is granted. Unref when the lock is unlocked. Change-Id: I2bfe9182b67bea7dc7b9d0ed9f99f1c7fa0b8a3c BUG: 783449 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/2891 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/locks/src/posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/features/locks/src/posix.c') diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index 31522da24..39991299c 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -1314,7 +1314,7 @@ pl_forget (xlator_t *this, list_for_each_entry_safe (ino_l, ino_tmp, &dom->inodelk_list, list) { __delete_inode_lock (ino_l); - __destroy_inode_lock (ino_l); + __pl_inodelk_unref (ino_l); } list_splice_init (&dom->blocked_inodelks, &inodelks_released); @@ -1355,7 +1355,7 @@ pl_forget (xlator_t *this, list_for_each_entry_safe (ino_l, ino_tmp, &inodelks_released, blocked_locks) { STACK_UNWIND_STRICT (inodelk, ino_l->frame, -1, 0); - __destroy_inode_lock (ino_l); + __pl_inodelk_unref (ino_l); } list_for_each_entry_safe (entry_l, entry_tmp, &entrylks_released, blocked_locks) { -- cgit