From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0670C433DF for ; Mon, 17 Aug 2020 19:08:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 74FF820738 for ; Mon, 17 Aug 2020 19:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597691332; bh=zAUNWZzCI8ukKqTvNlnlscIEQVsbnvlQ1UoOIQ2chNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=syzCjLnhVxSFxEfk8L9VsDOgAenRNQx1LOgaNbgEETiJPCc+ZcELb6XvX5UmoX6wM 1RFu2WqX+OKVGO45gKlUjO9Qu7/UY819OiSCf17+9gpqphJXycl1ooNSy03TQDhH9P 2SIqIMe08tc6N7ZHbqGKVPyD984qhLc/17saC1ds= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392029AbgHQTIv (ORCPT ); Mon, 17 Aug 2020 15:08:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:52956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387580AbgHQPmq (ORCPT ); Mon, 17 Aug 2020 11:42:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1FB9422CAE; Mon, 17 Aug 2020 15:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597678965; bh=zAUNWZzCI8ukKqTvNlnlscIEQVsbnvlQ1UoOIQ2chNc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z+MN5rnfFWwzdS0XRiRz510dIueG2eIPt91kEziLu7L7xJzpFgmSoL8WiUb8SvEa5 VF/ASpEHx5cBZz3+aEyCc/c+lSIVdc9wJTlfh34/7HwsJL75qTc6xPufUrd5/OIjCG ou4PY1nPZnjqpGlf9XYZSmlMygHIGvA0eZa9iRUY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chengming Zhou , Tejun Heo , Jens Axboe , Sasha Levin Subject: [PATCH 5.7 050/393] iocost: Fix check condition of iocg abs_vdebt Date: Mon, 17 Aug 2020 17:11:40 +0200 Message-Id: <20200817143822.042647179@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143819.579311991@linuxfoundation.org> References: <20200817143819.579311991@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chengming Zhou [ 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 Acked-by: Tejun Heo Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- block/blk-iocost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-iocost.c b/block/blk-iocost.c index ef193389fffe9..b5a9cfcd75e9d 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -1374,7 +1374,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; -- 2.25.1