From patchwork Wed Jan 10 14:58:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 124103 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5374797qgn; Wed, 10 Jan 2018 06:59:11 -0800 (PST) X-Google-Smtp-Source: ACJfBou/KSJgfa0486uq/Peb91OBlr/F1u7rgo7Zg6j2PfVVBzDeh4AZq8A8ct7/jLrCcgyMYUOb X-Received: by 10.98.63.214 with SMTP id z83mr4858355pfj.95.1515596351087; Wed, 10 Jan 2018 06:59:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515596351; cv=none; d=google.com; s=arc-20160816; b=JIVjuH4YcgjiFI+OFGMsxcktYvH0nv3YYPXb2iOUHzS5rZLOp5qpF+d+YNjckmtmP1 os2trcsn6uHOPA0aRppoyozqVcrmji/vMTmJDungCnoFHLzXG4oWUfKQODVjD01d5IBy xlT+5NiddrvScDBgYT0EEcrbnCJSkaA659b6hH921bKtVqC62PJI5gWawmqZJvDFqqwW FrXvDFqcRlWvTDEnyuC9wQy3SCEgaHvJJXAtQ+YsWchjH1AspzZ4BuhIUuVf/+1uFHts 0Jw1lMNNqROa1K+g1MWfuSp+7lcGBYW7SZcIJTQa20x1nKOnbibjgCftcwRCrbhvcu9z YIcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=w1JuFyMyTUMkR8+ehoYI1Q3OvGOv886WKmcOmGR7iHY=; b=IYHLdM6ItwLuM3mwaddLe9/a9sy3LPeFcI4hhuUmD4n/h0lxAYw4ahKis1HByURBCZ 2k5ddFfz+8lQ6GxLJROav9i1h887gpf5zgWe/GeannOSjuJb+kkCOb5vwsEDuxGtsuS6 caFfkETrCcGn3GxGPtQ1BQVyGePebqgxirZpvJg72z2Erx1KZ6GIoIjCVNmJs+iYnqQu p9HiZEJE0/uNQRDrIZMfDXX+1LWBjf26bZwbhcZAKwyoNgA/Tu8p9P+jnyAUIypSzjZa P6C2gLAcfCuXVP9HM97l3qsTQVgCjDfztewo90suuxexZE/KzR5zvw27AsfSvFAPonb5 7gAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AmZ2CH6N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si10633983pgq.707.2018.01.10.06.59.10; Wed, 10 Jan 2018 06:59:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AmZ2CH6N; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965223AbeAJO7I (ORCPT + 28 others); Wed, 10 Jan 2018 09:59:08 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:38922 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933878AbeAJO7F (ORCPT ); Wed, 10 Jan 2018 09:59:05 -0500 Received: by mail-wr0-f193.google.com with SMTP id z48so11896517wrz.6 for ; Wed, 10 Jan 2018 06:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w1JuFyMyTUMkR8+ehoYI1Q3OvGOv886WKmcOmGR7iHY=; b=AmZ2CH6NCjhC1xRDnADTyziIlG+jUzswbCCP5Co1ZACKFPrMX+YIt1rg0ii7aK1ekN SaTI4wPUfMdgaxI0yYz8uy+T2LKSYNuY1p/vL7Kr8eHlGiOTFq0bflaa1ds8rTF3q7rI 2WN74bPSBeSWAGQU9Lq+4EbXzL5+a6NXlLrL0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w1JuFyMyTUMkR8+ehoYI1Q3OvGOv886WKmcOmGR7iHY=; b=fgx8phuSYcHu75aD4djvZOfLz8kiF7gqinJTGUqP/CYIjYelOn/im8d0QsSY+t2cnS uQbJtBvRNP1/WAfbDFkBh3WJfC9S1VYv5PupPUD8yhK5OMwt8i0WqAtxomxoekgEXd3n y45nKIlGWjjkdSMH4yFvG8694cW16I0CpXh2JvK/fBNPOBK4MkjwAEADOT+MuFq9zjwx Q3Z69Z6f/gRAlZzqzFkroe4WS1MtFpwGjEEAhIBFumEfDsUEcftAYKI/A0ON+xlyEPXU ghtGuWPZq0qJ1vtuM/8V5tp++sqKCYJcM988LHYjKJOUgRgj1D8X6LiZ2a+iCc+rJx8A VFDQ== X-Gm-Message-State: AKGB3mKrG3OWfGgEY31gDoOQmtl01TKfshRvbWai1UJBvhmYT0hsLBmP a9vunVrAXpL5lJF1jqO6WA6xig== X-Received: by 10.223.131.229 with SMTP id 92mr16381001wre.255.1515596344763; Wed, 10 Jan 2018 06:59:04 -0800 (PST) Received: from wifi-122_dhcprange-5.wifi.unimo.it ([155.185.122.5]) by smtp.gmail.com with ESMTPSA id 53sm25346323wrv.20.2018.01.10.06.59.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jan 2018 06:59:04 -0800 (PST) From: Paolo Valente To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, broonie@kernel.org, linus.walleij@linaro.org, bfq-iosched@googlegroups.com, oleksandr@natalenko.name, Paolo Valente Subject: [PATCH BUGFIX 1/1] block, bfq: compile group put for oom queue only if BFQ_GROUP_IOSCHED is set Date: Wed, 10 Jan 2018 15:58:56 +0100 Message-Id: <20180110145856.4040-2-paolo.valente@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180110145856.4040-1-paolo.valente@linaro.org> References: <20180110145856.4040-1-paolo.valente@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit ("block, bfq: release oom-queue ref to root group on exit") added a missing put of the root bfq group for the oom queue. That put has to be, and can be, performed only if CONFIG_BFQ_GROUP_IOSCHED is defined: the function doing the put is even not defined at all if CONFIG_BFQ_GROUP_IOSCHED is not defined. But that commit makes that put be invoked regardless of whether CONFIG_BFQ_GROUP_IOSCHED is defined. This commit fixes this mistake, by making that invocation be compiled only if CONFIG_BFQ_GROUP_IOSCHED is actually defined. Fixes ("block, bfq: release oom-queue ref to root group on exit") Reported-by: Jan Alexander Steffens Signed-off-by: Paolo Valente --- block/bfq-iosched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.15.1 diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index c56a495af2e8..93a97a7fe519 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5015,10 +5015,9 @@ static void bfq_exit_queue(struct elevator_queue *e) hrtimer_cancel(&bfqd->idle_slice_timer); +#ifdef CONFIG_BFQ_GROUP_IOSCHED /* release oom-queue reference to root group */ bfqg_and_blkg_put(bfqd->root_group); - -#ifdef CONFIG_BFQ_GROUP_IOSCHED blkcg_deactivate_policy(bfqd->queue, &blkcg_policy_bfq); #else spin_lock_irq(&bfqd->lock);