[Ocfs2-commits] khackel commits r2566 - tags/ocfs2-1.0.3/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Sep 14 16:55:27 CDT 2005


Author: khackel
Signed-off-by: mfasheh
Date: 2005-09-14 16:55:26 -0500 (Wed, 14 Sep 2005)
New Revision: 2566

Modified:
   tags/ocfs2-1.0.3/fs/ocfs2/dlm/dlmmaster.c
Log:
* backport of r2565
  - fixes race in lock mastery

Signed-off-by: mfasheh



Modified: tags/ocfs2-1.0.3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- tags/ocfs2-1.0.3/fs/ocfs2/dlm/dlmmaster.c	2005-09-14 21:53:54 UTC (rev 2565)
+++ tags/ocfs2-1.0.3/fs/ocfs2/dlm/dlmmaster.c	2005-09-14 21:55:26 UTC (rev 2566)
@@ -681,7 +681,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
@@ -690,6 +689,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) {
@@ -1820,7 +1820,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