diff mbox series

[V2,7/13] md: use time_is_before_jiffies(() instead of jiffies judgment

Message ID 1644546640-23283-8-git-send-email-wangqing@vivo.com (mailing list archive)
State Mainlined
Commit 8ca8b1e147b7235527bef1a4ea274cc8894e98c5
Headers show
Series use time_is_xxx() instead of jiffies judgment | expand

Commit Message

王擎 Feb. 11, 2022, 2:30 a.m. UTC
From: Wang Qing <wangqing@vivo.com>

It is better to use time_xxx() directly instead of jiffies judgment
for understanding.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 drivers/md/dm-thin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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_is_before_jiffies(t->threshold)) {
 		down_write(&t->lock);
 		t->throttle_applied = true;
 	}