lkml.org 
[lkml]   [2004]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] jiffies handling in md.c
Hello,
md_do_sync in md.c doesn't handle jiffies overflow correctly.
The attached patch fixes this by changing the comparison to use the
time_after_eq macro.
Only compile-tested.

Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
--- linux-2.6.10-rc2-bk12/drivers/md/md.c.orig 2004-11-16 21:04:12.000000000 +0100
+++ linux-2.6.10-rc2-bk12/drivers/md/md.c 2004-11-29 00:02:29.854834272 +0100
@@ -3394,7 +3394,7 @@ static void md_do_sync(mddev_t *mddev)
break;

repeat:
- if (jiffies >= mark[last_mark] + SYNC_MARK_STEP ) {
+ if (time_after_eq(jiffies, mark[last_mark] + SYNC_MARK_STEP )) {
/* step marks */
int next = (last_mark+1) % SYNC_MARKS;
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.042 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site