blk-iocost: fix incorrect vtime comparison in iocg_is_idle()

vtimes may wrap and time_before/after64() should be used to determine
whether a given vtime is before or after another. iocg_is_idle() was
incorrectly using plain "<" comparison do determine whether done_vtime
is before vtime. Here, the only thing we're interested in is whether
done_vtime matches vtime which indicates that there's nothing in
flight. Let's test for inequality instead.

Signed-off-by: Tejun Heo <>
Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost")
Cc: # v5.4+
Signed-off-by: Jens Axboe <>
1 file changed