[Ocfs2-commits] mfasheh commits r2693 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Nov 9 17:22:26 CST 2005
Author: mfasheh
Signed-off-by: khackel
Date: 2005-11-09 17:22:25 -0600 (Wed, 09 Nov 2005)
New Revision: 2693
Modified:
trunk/fs/ocfs2/dlm/dlmmaster.c
Log:
* Fix a leak in the mle cache
Signed-off-by: khackel
Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c 2005-11-09 00:29:44 UTC (rev 2692)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c 2005-11-09 23:22:25 UTC (rev 2693)
@@ -317,6 +317,7 @@
assert_spin_locked(&dlm->spinlock);
assert_spin_locked(&dlm->master_lock);
+ BUG_ON(!atomic_read(&mle->mle_refs.refcount));
kref_put(&mle->mle_refs, dlm_mle_release);
}
@@ -1630,10 +1631,11 @@
// mlog(0, "woo! got an assert_master from node %u!\n",
// assert->node_idx);
if (mle) {
- int block;
+ int extra_ref;
spin_lock(&mle->spinlock);
- block = !!(mle->type == DLM_MLE_BLOCK);
+ extra_ref = !!(mle->type == DLM_MLE_BLOCK
+ || mle->type == DLM_MLE_MIGRATION);
mle->master = assert->node_idx;
atomic_set(&mle->woken, 1);
wake_up(&mle->wq);
@@ -1654,9 +1656,9 @@
dlm_mle_detach_hb_events(dlm, mle);
dlm_put_mle(mle);
- if (block) {
+ if (extra_ref) {
/* the assert master message now balances the extra
- * ref given by the master request message.
+ * ref given by the master / migration request message.
* if this is the last put, it will be removed
* from the list. */
dlm_put_mle(mle);
More information about the Ocfs2-commits
mailing list