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

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Mar 21 18:58:12 CST 2005


Author: khackel
Signed-off-by: mfasheh
Date: 2005-03-21 18:58:10 -0600 (Mon, 21 Mar 2005)
New Revision: 2032

Modified:
   trunk/fs/ocfs2/dlm/dlmconvert.c
Log:
* fixed nasty bug in dlmconvert.  calling __dlmconvert_master without
  res->spinlock 

Signed-off-by: mfasheh



Modified: trunk/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmconvert.c	2005-03-22 00:49:10 UTC (rev 2031)
+++ trunk/fs/ocfs2/dlm/dlmconvert.c	2005-03-22 00:58:10 UTC (rev 2032)
@@ -105,6 +105,8 @@
 	struct list_head *iter;
 	dlm_lock *tmplock=NULL;
 
+	assert_spin_locked(&res->spinlock);
+
 	dlmprintk("type=%d, convert_type=%d, new convert_type=%d\n", lock->ml.type,
 		  lock->ml.convert_type, type);
 
@@ -446,9 +448,12 @@
 	}
 
 #warning i think we need some handling of IN_PROGRESS here!
+	spin_lock(&res->spinlock);
 	status = __dlmconvert_master(dlm, res, lock, flags, cnv->requested_type,
 				     &call_ast, &kick_thread);
+	spin_unlock(&res->spinlock);
 
+
 	if (status != DLM_NORMAL)
 		lksb->flags &= ~(DLM_LKSB_GET_LVB|DLM_LKSB_PUT_LVB);
 



More information about the Ocfs2-commits mailing list