[Ocfs2-commits] khackel commits r2293 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu May 19 18:44:13 CDT 2005
Author: khackel
Signed-off-by: mfasheh
Date: 2005-05-19 18:44:11 -0500 (Thu, 19 May 2005)
New Revision: 2293
Modified:
trunk/fs/ocfs2/dlm/dlmunlock.c
Log:
* fixes bug 427 (one too many dlm_lock refs after an unlock would leak
a dlm_lock, dlm_lockres and dlm_lockstatus for each lock)
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/dlm/dlmunlock.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmunlock.c 2005-05-19 23:14:26 UTC (rev 2292)
+++ trunk/fs/ocfs2/dlm/dlmunlock.c 2005-05-19 23:44:11 UTC (rev 2293)
@@ -195,14 +195,13 @@
spin_unlock(&res->spinlock);
wake_up(&res->wq);
- /* let the caller's final dlm_lock_put handle the actual kfree
- * NOTE: this silly block and the FREE_LOCK constant
- * can go once the lock refcounting stuff is tested */
+ /* let the caller's final dlm_lock_put handle the actual kfree */
if (actions & DLM_UNLOCK_FREE_LOCK) {
/* this should always be coupled with list removal */
DLM_ASSERT(actions & DLM_UNLOCK_REMOVE_LOCK);
mlog(0, "lock %"MLFu64" should be gone now! refs=%d\n",
- lock->ml.cookie, atomic_read(&lock->lock_refs.refcount));
+ lock->ml.cookie, atomic_read(&lock->lock_refs.refcount)-1);
+ dlm_lock_put(lock);
}
if (actions & DLM_UNLOCK_CALL_AST)
*call_ast = 1;
@@ -448,8 +447,7 @@
/* cancel this outright */
lksb->status = DLM_NORMAL;
status = DLM_NORMAL;
- *actions = (DLM_UNLOCK_FREE_LOCK |
- DLM_UNLOCK_CALL_AST |
+ *actions = (DLM_UNLOCK_CALL_AST |
DLM_UNLOCK_REMOVE_LOCK);
} else if (dlm_lock_on_list(&res->converting, lock)) {
/* cancel the request, put back on granted */
More information about the Ocfs2-commits
mailing list