From: Wang Qing Date: Tue, 15 Feb 2022 01:55:44 +0000 (-0800) Subject: dm thin: use time_is_before_jiffies instead of open coding it X-Git-Tag: v5.18-rc1~128^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ca8b1e147b7235527bef1a4ea274cc8894e98c5;p=thirdparty%2Fkernel%2Flinux.git dm thin: use time_is_before_jiffies instead of open coding it Use time_is_before_jiffies() to improve code readability. Signed-off-by: Wang Qing Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index f4234d615aa1b..2c13731a3b449 100644 --- 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; }