Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 24e278e14a25367b8cb2fce8af484abd > files > 165

cman-2.0.115-96.el5_8.3.src.rpm

From ec8361d744d079be5c9c146e8a8b0762a9810275 Mon Sep 17 00:00:00 2001
From: Lon Hohberger <lhh@redhat.com>
Date: Thu, 3 Mar 2011 17:39:10 -0500
Subject: [PATCH] qdiskd: Fix bad timer check - RHEL5

Resolves: rhbz#679274

Signed-off-by: Lon Hohberger <lhh@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Tested-by: Masanari Iida <masanari_iida@hp.com>
---
 cman/qdisk/score.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cman/qdisk/score.c b/cman/qdisk/score.c
index 2e8993d..1907e4a 100644
--- a/cman/qdisk/score.c
+++ b/cman/qdisk/score.c
@@ -107,7 +107,8 @@ fork_heuristic(struct h_data *h, struct timespec *now)
 	}
 
 	if (now->tv_sec < h->nextrun.tv_sec ||
-	    now->tv_nsec < h->nextrun.tv_nsec)
+	    ((now->tv_sec == h->nextrun.tv_sec) &&
+	     (now->tv_nsec < h->nextrun.tv_nsec)))
 		return 0;
 
 	h->nextrun.tv_sec = now->tv_sec + h->interval;
-- 
1.7.3.4