mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] jiffies handling in md.c
Date: Mon, 29 Nov 2004 00:22:40 +0100	[thread overview]
Message-ID: <41AA5DC0.20403@stud.feec.vutbr.cz> (raw)

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]

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>

[-- Attachment #2: md-jiffies.patch --]
[-- Type: text/x-patch, Size: 434 bytes --]

--- 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;
 

                 reply	other threads:[~2004-11-28 23:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41AA5DC0.20403@stud.feec.vutbr.cz \
    --to=xschmi00@stud.feec.vutbr.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®