diff options
Diffstat (limited to 'block/blk-throttle.c')
-rw-r--r-- | block/blk-throttle.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 4007b26d4fd7..7e72102aa918 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -2077,10 +2077,14 @@ static void throtl_downgrade_check(struct throtl_grp *tg) static void blk_throtl_update_idletime(struct throtl_grp *tg) { - unsigned long now = ktime_get_ns() >> 10; + unsigned long now; unsigned long last_finish_time = tg->last_finish_time; - if (now <= last_finish_time || last_finish_time == 0 || + if (last_finish_time == 0) + return; + + now = ktime_get_ns() >> 10; + if (now <= last_finish_time || last_finish_time == tg->checked_last_finish_time) return; |