Skip to content

Commit

Permalink
dm thin: use time_is_before_jiffies instead of open coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang Qing authored and Mike Snitzer committed Feb 22, 2022
1 parent 6fc5150 commit 8ca8b1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-thin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8ca8b1e

Please sign in to comment.