[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1644481874-14812-1-git-send-email-wangqing@vivo.com>
Date: Thu, 10 Feb 2022 00:31:14 -0800
From: Qing Wang <wangqing@...o.com>
To: Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>
Subject: [PATCH] md: use time_after_eq() instead of jiffies judgment
From: Wang Qing <wangqing@...o.com>
It is better to use time_xxx() directly instead of jiffies judgment
for understanding.
Signed-off-by: Wang Qing <wangqing@...o.com>
---
drivers/md/dm-thin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index f4234d6..dced764
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -161,7 +161,7 @@ static void throttle_work_start(struct throttle *t)
static void throttle_work_update(struct throttle *t)
{
- if (!t->throttle_applied && jiffies > t->threshold) {
+ if (!t->throttle_applied && time_after(jiffies, t->threshold)) {
down_write(&t->lock);
t->throttle_applied = true;
}
--
2.7.4
Powered by blists - more mailing lists