This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RHEL4 - Revert "magma-plugins: Fix loops allowing 65539 to be passedup"


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0179f8e9edc98ace2e59cb432476e2d9dd89cfde
Commit:        0179f8e9edc98ace2e59cb432476e2d9dd89cfde
Parent:        f1bd71ba88937e169bada8a23f23da104ba971bf
Author:        Lon Hohberger <lhh@redhat.com>
AuthorDate:    Wed Sep 17 15:04:42 2008 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Wed Sep 17 15:04:42 2008 -0400

Revert "magma-plugins: Fix loops allowing 65539 to be passed up"

This reverts commit 84ad017e8091cda3e538ab439ec4938e640fe22d.
---
 magma-plugins/sm/sm.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/magma-plugins/sm/sm.c b/magma-plugins/sm/sm.c
index caafac2..6867b81 100644
--- a/magma-plugins/sm/sm.c
+++ b/magma-plugins/sm/sm.c
@@ -578,14 +578,14 @@ _dlm_lock(sm_priv_t *p, int mode, struct dlm_lksb *lksb, int options,
         if (ret < 0)
                 return -1;
 
-	while (lksb.sb_status == EINPROG) {
-		if (wait_for_dlm_event(p->ls) < 0) {
-			if (lksb->sb_status == EINPROG)
-				continue;
-			errno = lksb->sb_status;
-			return -1;
-		}
-	}
+        while ((ret = (wait_for_dlm_event(p->ls) < 0))) {
+		/* If nothing much has happened, just
+		   wait a bit longer */
+		if (lksb->sb_status == EINPROG)
+			continue;
+                errno = lksb->sb_status;
+                return -1;
+        }
 
 	/* Got the lock ! */
         return 0;
@@ -652,14 +652,14 @@ _dlm_unlock(sm_priv_t *p, struct dlm_lksb *lksb)
 
         /* lksb->sb_status should be EINPROG at this point */
 
-	while (lksb.sb_status == EINPROG) {
-		if (wait_for_dlm_event(p->ls) < 0) {
-			if (lksb->sb_status == EINPROG)
-				continue;
-			errno = lksb->sb_status;
-			return -1;
-		}
-	}
+        while (wait_for_dlm_event(p->ls) < 0) {
+		/* If nothing much has happened, just
+		   wait a bit longer */
+		if (lksb->sb_status == EINPROG)
+			continue;
+                errno = lksb->sb_status;
+                return -1;
+        }
 
         return 0;
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]