]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iocost: Fix check condition of iocg abs_vdebt
authorChengming Zhou <zhouchengming@bytedance.com>
Thu, 30 Jul 2020 09:03:21 +0000 (17:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:26:11 +0000 (08:26 +0200)
[ 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>
block/blk-iocost.c

index 8ac4aad66ebc3783e009c51282eb52aa3edaa15d..86ba6fd254e1de0d8cf71c43c503f2d137c7011e 100644 (file)
@@ -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;