[Ocfs2-commits] khackel commits r2654 - trunk/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Oct 14 19:44:19 CDT 2005


Author: khackel
Signed-off-by: mfasheh
Date: 2005-10-14 19:44:19 -0500 (Fri, 14 Oct 2005)
New Revision: 2654

Modified:
   trunk/fs/ocfs2/dlm/dlmmaster.c
Log:
* one caller of dlm_get_mle was not taking dlm->spinlock, fix it
* may look at eliminating dlm->master_lock in the future if all
  uses of it require dlm->spinlock also

Signed-off-by: mfasheh



Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c	2005-10-15 00:38:47 UTC (rev 2653)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c	2005-10-15 00:44:19 UTC (rev 2654)
@@ -1885,10 +1885,14 @@
 
 	/* get an extra reference on the mle.
 	 * otherwise the assert_master from the new
-	 * master will destroy this. */
+	 * master will destroy this.
+	 * also, make sure that all callers of dlm_get_mle
+	 * take both dlm->spinlock and dlm->master_lock */
+	spin_lock(&dlm->spinlock);
 	spin_lock(&dlm->master_lock);
 	dlm_get_mle(mle);
 	spin_unlock(&dlm->master_lock);
+	spin_unlock(&dlm->spinlock);
 
 	/* notify new node and send all lock state */
 	/* call send_one_lockres with migration flag.



More information about the Ocfs2-commits mailing list