[Ocfs2-commits] mfasheh commits r2124 - trunk/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Apr 7 20:30:01 CDT 2005


Author: mfasheh
Signed-off-by: khackel
Date: 2005-04-07 20:29:59 -0500 (Thu, 07 Apr 2005)
New Revision: 2124

Modified:
   trunk/fs/ocfs2/dlm/dlmmaster.c
Log:
* Fix a spinlock deadlock during migration.

Signed-off-by: khackel



Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c	2005-04-07 21:24:05 UTC (rev 2123)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c	2005-04-08 01:29:59 UTC (rev 2124)
@@ -1450,9 +1450,11 @@
 		/* target chosen is not alive */
 		ret = -EINVAL;
 	}
-	spin_unlock(&dlm->spinlock);
-	if (ret)
+
+	if (ret) {
+		spin_unlock(&dlm->spinlock);
 		goto not_live;
+	}
 
 	dlmprintk("continuing with target = %u\n", target);
 
@@ -1463,6 +1465,7 @@
 			      target, dlm->node_num);
 	mle_added = 1;
 	spin_unlock(&dlm->master_lock);
+	spin_unlock(&dlm->spinlock);
 
 	/* set migrating flag on lockres */
 	spin_lock(&res->spinlock);
@@ -1794,6 +1797,9 @@
 
 	dlmprintk0("\n");
 
+	assert_spin_locked(&dlm->spinlock);
+	assert_spin_locked(&dlm->master_lock);
+
 	found = dlm_find_mle(dlm, oldmle, (char *)name, namelen);
 	if (found) {
 		dlm_master_list_entry *tmp = *oldmle;



More information about the Ocfs2-commits mailing list