From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6773 invoked by alias); 17 Sep 2008 19:07:17 -0000 Received: (qmail 6580 invoked by alias); 17 Sep 2008 19:07:16 -0000 X-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_05,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: RHEL4 - Revert "magma-plugins: Fix loops allowing 65539 to be passed up" To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/RHEL4 X-Git-Reftype: branch X-Git-Oldrev: f1bd71ba88937e169bada8a23f23da104ba971bf X-Git-Newrev: 0179f8e9edc98ace2e59cb432476e2d9dd89cfde From: Lon Hohberger Message-Id: <20080917190603.40630C07B7@lists.fedorahosted.org> Date: Wed, 17 Sep 2008 20:06:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00460.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=0179f8e9edc98ace2e59cb432476e2d9dd89cfde Commit: 0179f8e9edc98ace2e59cb432476e2d9dd89cfde Parent: f1bd71ba88937e169bada8a23f23da104ba971bf Author: Lon Hohberger AuthorDate: Wed Sep 17 15:04:42 2008 -0400 Committer: Lon Hohberger 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; }