Skip to contentSkip to conversation

qdiskd: Fix bad timer check - RHEL6

PATCH New Lon Hohberger 2 participants 2 messages Mar 17, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qdiskd: Fix bad timer check - RHEL6

Resolves: rhbz#688154

---
 cman/qdisk/score.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
cman/qdisk/score.c +2 -1
index 572464d..3ca531f 100644
@@ -86,7 +86,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;
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 qdiskd: Fix bad timer check - RHEL6

Both rhel5 and 6 ACK.

Fabio

Quoted 22 lines · Lon Hohberger

Resolves: rhbz#688154

---
 cman/qdisk/score.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
cman/qdisk/score.c +2 -1
index 572464d..3ca531f 100644
@@ -86,7 +86,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;