Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2639827pxa; Mon, 17 Aug 2020 15:11:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyP5mvIznsC5kJ3eb9MDsOq4aLvLVcFcmvdIjxDiW2oXQh8hGfcRozU3Z93NsxqLkScP6a1 X-Received: by 2002:a17:906:aad2:: with SMTP id kt18mr17875081ejb.537.1597702292525; Mon, 17 Aug 2020 15:11:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702292; cv=none; d=google.com; s=arc-20160816; b=rFH6Mo1gLewMY/cXiIpxbujVUOEQp1mFF70Rn7xwjq2qeVHZra87ovm1QBOrQhVed1 lQFZREbryHc4swyBChY2KA9AIi+oLUGZcGju2R3tW1gHnN3vD1VGe65/dvhJhkmJoCaT 5WmvQNJJFN9hE93x8M6vj0yctmc5BUYW7/whywyI0Dbg4t+SI5cvSgRwjISWmWtihnp5 grC61uUhgepaeXA8xLrGT71/gGW4yoZmW6ZoRYT8tEvn/AUbsuunMdp7wHlCJw6214xu iyt8blEbv3nZ/cTAIOymCx8SibSrOUYxLwk3C1x05Cg0cm8YuTQSYdA+XvkkMznMKCRN 7gXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jUwL6OD9TR4zt6BdRXd+8XAaOxZf/6PNL8tH/WjKkJM=; b=KUAb+7Nr0SiDQZKqueVW1U1jf43F9gOGDaz0Eu5KFeYmb+2hBP+4X+XGNxppJxqeG1 xcPh3NCGKsxTFQURFgtPBQQDLEhH3UhF4V3Af2MwWwEDemCP3KaThoQJTadLFwYXyVvJ HAtO96/oc/6i4TF7iK8RRc9IwGv7F8ji26KAkWj3ikLAWrwdc4hEFAVsuJ4yDZfHjgDY bGRMme66TO0TcQ4ekmqTnOHlYm5FJ8FG+3mfjscmn6MBwF/SVCyLzIvlFXhigKivoz4X 2K2H714R4J/yN86s4t2SmDgSsE4/Qa9M1XL8fwkX/YtjBTNBOOnL3DSGzVu0djjh0iCK ETig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r5S+ZIR9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si12751966edl.306.2020.08.17.15.11.09; Mon, 17 Aug 2020 15:11:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=r5S+ZIR9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731325AbgHQQrT (ORCPT + 99 others); Mon, 17 Aug 2020 12:47:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:48486 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387831AbgHQQBC (ORCPT ); Mon, 17 Aug 2020 12:01:02 -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 1227920748; Mon, 17 Aug 2020 16:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680061; bh=II2jU+hdZxVqYC9gS6Z+ZKE+DZDH2JmlXDJESTVV82k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r5S+ZIR9bAq9h8t+Zf51Cw2J8eZXv9nQ1T+DuF2uw3C2e6lQyjyAIxAKVTtIb4tuM np9CuqzRRV4GqGXzZ0DDKcQSImMgk6B3OYblB15AEuR7JPEw5n4/kFpmE3uzYTbd0P LfpXQFn2li6RJ9uC+cfZTIT05W9W7Nqehmyjz8JA= 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.4 038/270] iocost: Fix check condition of iocg abs_vdebt Date: Mon, 17 Aug 2020 17:13:59 +0200 Message-Id: <20200817143757.701645077@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@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 4d2bda812d9b4..dcc6685d5becc 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -1377,7 +1377,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