[Ocfs2-commits] smushran commits r3090 - branches/ocfs2-1.2/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri May 2 14:23:31 PDT 2008


Author: smushran
Date: 2008-05-02 14:23:31 -0700 (Fri, 02 May 2008)
New Revision: 3090

Modified:
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c
Log:
ocfs2/dlm: dlm_thread should not sleep while holding the dlm_spinlock

Mainline commit c824c3c723f2e37a00b3b739a55b28de595fd72e
Author: Sunil Mushran <sunil.mushran at oracle.com>
Date: Sat, 1 Mar 2008 14:04:25 -0800

This patch addresses the bug in which the dlm_thread could go to sleep
while holding the dlm_spinlock.

Signed-off-by: jlbec

Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c	2008-05-02 21:22:40 UTC (rev 3089)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c	2008-05-02 21:23:31 UTC (rev 3090)
@@ -177,12 +177,14 @@
 	     res->lockname.name, master);
 
 	if (!master) {
+		/* drop spinlock...  retake below */
+		spin_unlock(&dlm->spinlock);
+
 		spin_lock(&res->spinlock);
 		/* This ensures that clear refmap is sent after the set */
 		__dlm_wait_on_lockres_flags(res, DLM_LOCK_RES_SETREF_INPROG);
 		spin_unlock(&res->spinlock);
-		/* drop spinlock to do messaging, retake below */
-		spin_unlock(&dlm->spinlock);
+
 		/* clear our bit from the master's refmap, ignore errors */
 		ret = dlm_drop_lockres_ref(dlm, res);
 		if (ret < 0) {




More information about the Ocfs2-commits mailing list