From nobody Mon Feb 9 02:13:15 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 29AA9217723; Fri, 10 Oct 2025 09:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760087741; cv=none; b=pSZIwQa/8UAhR9q6xqUvINVke6iolw2OYZU/KRKTDIhEeIJXhaHCxfCdLMW7Wqmd9kIrsU2+XjagvXU8JvsTRg5loIX/3u1i9DXEH20hK4D8PpHUc3cZu1YTvwfDekKUCvRujLkKZrTm1aBiC+q77hXxMdy1YfwWNRRlC3UUy/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760087741; c=relaxed/simple; bh=R9L4Dfzvxc48pIpRSH2GwrKBjgbQXWcbaCisT1DQcVI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KCplrfp6APU0Udo1faeqG5M7T2gQoJGtJ8fzzz4fs8Qwwd4PAyXVKsrOKb7LgWPPlKYyi2Jd+/KgB6Pu5G7qSQnti2OW9ivbpeEQGq8wlx8NFs1zi+IU6mLmlM6hvueRF862QptNvlUycnlJrxg6XXc71TIQm00PkY/wxt6DpLI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B5SV/D+Q; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B5SV/D+Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD6B8C4CEF8; Fri, 10 Oct 2025 09:15:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760087741; bh=R9L4Dfzvxc48pIpRSH2GwrKBjgbQXWcbaCisT1DQcVI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B5SV/D+QlEUmh3ZuhCIqcng4zG0GCCkFGbiEg8ie+ryPtdnPNLIkW+8KBUnNUZCii RkFgDTjJ9lPxsaXWv7U0WEUoK5IsxwSQiWMGC+uL0grK92MGaYSwv7gpcr1U55JrSf h3GiT1Z+sPds8cBCcb2SaAFgpZ1wZCKUz8F9TR+S7i9F4rLIEwJy04GO6s12SQC/lU wAXzOo0wPxINFL7paX3e4zfUwz/QyoAh3iqcvSWSp/FE3SPbNUIS+CYUpnWlRkRODi mmfqIr5qRJAIfZ9gfSjmUP+tVzoQNJkNv94sxr9UEpwld2hz0JKaKNymBVyutwL9DB UjthDQnAtZtuw== From: Yu Kuai To: axboe@kernel.dk, tj@kernel.org, linux-block@vger.kernel.org, cgroups@vger.kernel.org, nilay@linux.ibm.com, bvanassche@acm.org, ming.lei@redhat.com, hch@lst.de Cc: linux-kernel@vger.kernel.org, Yu Kuai Subject: [PATCH v2 17/19] blk-iolatency: convert to use blkg_conf_{start, end} Date: Fri, 10 Oct 2025 17:14:42 +0800 Message-ID: <20251010091446.3048529-18-yukuai@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251010091446.3048529-1-yukuai@kernel.org> References: <20251010091446.3048529-1-yukuai@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Yu Kuai No functional changes are intended, make code cleaner. Signed-off-by: Yu Kuai --- block/blk-iolatency.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index ce25fbb8aaf6..1199447a2a33 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -768,7 +768,7 @@ static int blk_iolatency_init(struct gendisk *disk) &blkcg_iolatency_ops); if (ret) goto err_free; - ret =3D blkcg_activate_policy(disk, &blkcg_policy_iolatency); + ret =3D __blkcg_activate_policy(disk, &blkcg_policy_iolatency); if (ret) goto err_qos_del; =20 @@ -837,10 +837,9 @@ static ssize_t iolatency_set_limit(struct kernfs_open_= file *of, char *buf, int ret; =20 blkg_conf_init(&ctx, buf); - - ret =3D blkg_conf_open_bdev(&ctx); + ret =3D blkg_conf_start(blkcg, &ctx); if (ret) - goto out; + return ret; =20 /* * blk_iolatency_init() may fail after rq_qos_add() succeeds which can @@ -852,10 +851,6 @@ static ssize_t iolatency_set_limit(struct kernfs_open_= file *of, char *buf, if (ret) goto out; =20 - ret =3D blkg_conf_prep(blkcg, &blkcg_policy_iolatency, &ctx); - if (ret) - goto out; - iolat =3D blkg_to_lat(ctx.blkg); p =3D ctx.body; =20 @@ -890,7 +885,7 @@ static ssize_t iolatency_set_limit(struct kernfs_open_f= ile *of, char *buf, iolatency_clear_scaling(blkg); ret =3D 0; out: - blkg_conf_exit(&ctx); + blkg_conf_end(&ctx); return ret ?: nbytes; } =20 --=20 2.51.0