From 916ca4d87c410c075a622fc24848ba06868c280a Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Tue, 17 Nov 2009 05:24:03 +0000 Subject: Do not access a free'd lock while releasing all inodelks of transport. 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 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'xlators') diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index 53a708fdbd2..89bb81f4224 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -340,13 +340,11 @@ grant_blocked_inode_locks (xlator_t *this, pl_inode_t *pl_inode, pl_inode_lock_t { if (list_empty (&dom->blocked_inodelks)) { - goto out; + gf_log (this->name, GF_LOG_TRACE, + "No locks for domain: %s", dom->domain); } - __grant_blocked_inode_locks (this, pl_inode, dom); -out: - __destroy_inode_lock (lock); } @@ -378,11 +376,11 @@ release_inode_locks_of_transport (xlator_t *this, pl_dom_list_t *dom, if (l->transport != trans) continue; - list_del_init (&l->list); + __delete_inode_lock (l); grant_blocked_inode_locks (this, pinode, l, dom); - __delete_inode_lock (l); + __destroy_inode_lock (l); if (inode_path (inode, NULL, &path) < 0) { gf_log (this->name, GF_LOG_TRACE, -- cgit