[Ocfs2-commits] mfasheh commits r1366 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Aug 20 13:48:54 CDT 2004


Author: mfasheh
Date: 2004-08-20 12:48:53 -0500 (Fri, 20 Aug 2004)
New Revision: 1366

Modified:
   trunk/src/dlm.c
Log:
* fix a bug in acquire_lock where we didn't re-calculate the 'updated'
  variable at the right time.



Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c	2004-08-20 05:10:52 UTC (rev 1365)
+++ trunk/src/dlm.c	2004-08-20 17:48:53 UTC (rev 1366)
@@ -548,9 +548,9 @@
 	}
 
 	updated = 0;
-again:
 	ocfs_acquire_lockres (lockres, 0);  // ocfs_acquire_lock
 
+again:
 	LOG_TRACE_ARGS("attempting to get lock, pass: %d\n", ++k);
 
 	if (!updated) {
@@ -690,10 +690,6 @@
 	status = new_lock_function(osb, lock_type, flags|extra_lock_flags, 
 				   *b, &disk_vote, inode);
 	if (status < 0) {
-		/* if we're going to jump back up, we want to update
-		 * if we're not the master... */
-		if (lockres->master_node_num != osb->node_num)
-			updated = 0;
 		ocfs_release_lockres (lockres); // ocfs_acquire_lock
 		if (status == -EAGAIN || status == -ETIMEDOUT) {
 			if (status == -ETIMEDOUT)
@@ -710,6 +706,11 @@
 				goto finally;
 			}
 			ocfs_sleep (50);
+			ocfs_acquire_lockres(lockres, 0);
+			/* if we're going to jump back up, we want to update
+			 * if we're not the master... */
+			if (lockres->master_node_num != osb->node_num)
+				updated = 0;
 			goto again;
 		}
 		goto finally;



More information about the Ocfs2-commits mailing list