summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2022-02-15 02:55:44 +0100
committerMike Snitzer <snitzer@redhat.com>2022-02-22 17:30:50 +0100
commit8ca8b1e147b7235527bef1a4ea274cc8894e98c5 (patch)
treed5d7c3faa24a9bea156303b7df7a508dbe075b78 /drivers/md
parentdm crypt: fix get_key_size compiler warning if !CONFIG_KEYS (diff)
downloadlinux-8ca8b1e147b7235527bef1a4ea274cc8894e98c5.tar.xz
linux-8ca8b1e147b7235527bef1a4ea274cc8894e98c5.zip
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 <wangqing@vivo.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-thin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index f4234d615aa1..2c13731a3b44 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;
}