[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210923134631.105719-4-yukuai3@huawei.com>
Date: Thu, 23 Sep 2021 21:46:28 +0800
From: Yu Kuai <yukuai3@...wei.com>
To: <axboe@...nel.dk>, <tj@...nel.org>
CC: <linux-block@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<cgroups@...r.kernel.org>, <yukuai3@...wei.com>,
<yi.zhang@...wei.com>
Subject: [PATCH 3/6] io-cost: introduce ioc_rqos_free()
Prepare to split 'kfree(ioc)' from ioc_rqos_exit(), no functional changes.
Signed-off-by: Yu Kuai <yukuai3@...wei.com>
---
block/blk-iocost.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index b3880e4ba22a..b4a6c1f70eb0 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2813,6 +2813,13 @@ static void ioc_rqos_exit(struct rq_qos *rqos)
kfree(ioc);
}
+static void ioc_rqos_free(struct rq_qos *rqos)
+{
+ struct ioc *ioc = rqos_to_ioc(rqos);
+
+ kfree(ioc);
+}
+
static struct rq_qos_ops ioc_rqos_ops = {
.throttle = ioc_rqos_throttle,
.merge = ioc_rqos_merge,
@@ -2820,6 +2827,7 @@ static struct rq_qos_ops ioc_rqos_ops = {
.done = ioc_rqos_done,
.queue_depth_changed = ioc_rqos_queue_depth_changed,
.exit = ioc_rqos_exit,
+ .free = ioc_rqos_free,
};
static int blk_iocost_init(struct request_queue *q)
--
2.31.1
Powered by blists - more mailing lists