summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorChengming Zhou <zhouchengming@bytedance.com>2020-07-30 12:03:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-19 09:26:11 +0300
commit35d16397b2abba10e25c4ad05965ef0ec7ff681e (patch)
treeca318b7b56a19ff17f9af41b5fc12cfc1f5f9c42 /block
parent793788d7848cbbbbc328cd57ac61156e0f3677a5 (diff)
downloadlinux-35d16397b2abba10e25c4ad05965ef0ec7ff681e.tar.xz
iocost: Fix check condition of iocg abs_vdebt
[ Upstream commit d9012a59db54442d5b2fcfdfcded35cf566397d3 ] We shouldn't skip iocg when its abs_vdebt is not zero. Fixes: 0b80f9866e6b ("iocost: protect iocg->abs_vdebt with iocg->waitq.lock") Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
-rw-r--r--block/blk-iocost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 8ac4aad66ebc..86ba6fd254e1 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -1370,7 +1370,7 @@ static void ioc_timer_fn(struct timer_list *timer)
* should have woken up in the last period and expire idle iocgs.
*/
list_for_each_entry_safe(iocg, tiocg, &ioc->active_iocgs, active_list) {
- if (!waitqueue_active(&iocg->waitq) && iocg->abs_vdebt &&
+ if (!waitqueue_active(&iocg->waitq) && !iocg->abs_vdebt &&
!iocg_is_idle(iocg))
continue;