From cec1f78d42f49f35448d81c944afb9afae19c959 Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Thu, 3 Dec 2009 16:10:16 +0000 Subject: features/locks: Fix inodelk leak when issued an UNLOCK. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Anand V. Avati BUG: 222 (Enhance Internal locks to support multilple domains and rewrite inodelks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=222 --- xlators/features/locks/src/inodelk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index 019604484d5..41228c887d0 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -347,10 +347,13 @@ grant_blocked_inode_locks (xlator_t *this, pl_inode_t *pl_inode, pl_inode_lock_t if (list_empty (&dom->blocked_inodelks)) { gf_log (this->name, GF_LOG_TRACE, - "No locks for domain: %s", dom->domain); + "No blocked locks to be granted for domain: %s", dom->domain); + goto out; } __grant_blocked_inode_locks (this, pl_inode, dom); +out: + __destroy_inode_lock (lock); } @@ -422,9 +425,6 @@ release_inode_locks_of_transport (xlator_t *this, pl_dom_list_t *dom, l->owner); - __destroy_inode_lock (l); - - } } unlock: -- cgit