[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210923134631.105719-3-yukuai3@huawei.com>
Date: Thu, 23 Sep 2021 21:46:27 +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 2/6] blk-wbt: introduce wbt_free()
Prepare to split 'kfree(rwb)' from wbt_exit(), no functional changes.
Signed-off-by: Yu Kuai <yukuai3@...wei.com>
---
block/blk-wbt.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/blk-wbt.c b/block/blk-wbt.c
index 874c1c37bf0c..4190453d5e0b 100644
--- a/block/blk-wbt.c
+++ b/block/blk-wbt.c
@@ -694,6 +694,13 @@ static void wbt_exit(struct rq_qos *rqos)
kfree(rwb);
}
+static void wbt_free(struct rq_qos *rqos)
+{
+ struct rq_wb *rwb = RQWB(rqos);
+
+ kfree(rwb);
+}
+
/*
* Disable wbt, if enabled by default.
*/
@@ -808,6 +815,7 @@ static struct rq_qos_ops wbt_rqos_ops = {
.cleanup = wbt_cleanup,
.queue_depth_changed = wbt_queue_depth_changed,
.exit = wbt_exit,
+ .free = wbt_free,
#ifdef CONFIG_BLK_DEBUG_FS
.debugfs_attrs = wbt_debugfs_attrs,
#endif
--
2.31.1
Powered by blists - more mailing lists