projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fc5150
)
dm thin: use time_is_before_jiffies instead of open coding it
author
Wang Qing
<wangqing@vivo.com>
Tue, 15 Feb 2022 01:55:44 +0000
(17:55 -0800)
committer
Mike Snitzer
<snitzer@redhat.com>
Tue, 22 Feb 2022 16:30:50 +0000
(11:30 -0500)
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>
drivers/md/dm-thin.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-thin.c
b/drivers/md/dm-thin.c
index f4234d615aa1b9a4b0c0d55a83fb662bbd14d2fb..2c13731a3b449d36b76682e990b3c8bff2f9e79b 100644
(file)
--- 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;
}