RHEL4 - magma-plugins: Fix loops allowing 65539 to be passed up
Lon Hohberger
lon@fedoraproject.org
Thu Sep 11 18:56:00 GMT 2008
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=84ad017e8091cda3e538ab439ec4938e640fe22d
Commit: 84ad017e8091cda3e538ab439ec4938e640fe22d
Parent: 651858b37a27ee735423103e65bc39121b5ece0a
Author: Lon Hohberger <lhh@redhat.com>
AuthorDate: Thu Sep 11 12:53:01 2008 -0400
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Thu Sep 11 12:53:55 2008 -0400
magma-plugins: Fix loops allowing 65539 to be passed up
rhbz#294491 redux
---
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 6867b81..caafac2 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 ((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;
- }
+ 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;
+ }
+ }
/* 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 (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;
- }
+ 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;
+ }
+ }
return 0;
}
More information about the Cluster-cvs
mailing list