[Ocfs2-commits] khackel commits r2565 - trunk/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Wed Sep 14 16:53:55 CDT 2005
Author: khackel
Signed-off-by: mfasheh
Date: 2005-09-14 16:53:54 -0500 (Wed, 14 Sep 2005)
New Revision: 2565
Modified:
trunk/fs/ocfs2/dlm/dlmmaster.c
Log:
* fix lock mastery (fixes a race where the master list entry could be
visible in the master list before its corresponding lockres)
Signed-off-by: mfasheh
Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c 2005-09-14 01:47:53 UTC (rev 2564)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c 2005-09-14 21:53:54 UTC (rev 2565)
@@ -753,7 +753,6 @@
dlm_init_mle(mle, DLM_MLE_MASTER, dlm, res, NULL, 0);
list_add(&mle->list, &dlm->master_list);
}
- spin_unlock(&dlm->master_lock);
/* at this point there is either a DLM_MLE_BLOCK or a
* DLM_MLE_MASTER on the master list, so it's safe to add the
@@ -762,6 +761,7 @@
/* finally add the lockres to its hash bucket */
__dlm_insert_lockres(dlm, res);
+ spin_unlock(&dlm->master_lock);
spin_unlock(&dlm->spinlock);
if (blocked) {
@@ -1888,7 +1888,9 @@
/* get an extra reference on the mle.
* otherwise the assert_master from the new
* master will destroy this. */
+ spin_lock(&dlm->master_lock);
dlm_get_mle(mle);
+ spin_unlock(&dlm->master_lock);
/* notify new node and send all lock state */
/* call send_one_lockres with migration flag.
More information about the Ocfs2-commits
mailing list