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>
This commit is contained in:
parent
6fc5150438
commit
8ca8b1e147
@ -161,7 +161,7 @@ static void throttle_work_start(struct throttle *t)
|
|||||||
|
|
||||||
static void throttle_work_update(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);
|
down_write(&t->lock);
|
||||||
t->throttle_applied = true;
|
t->throttle_applied = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user