From 5b16ba935e47bbfc4c1b7ae34841282510bbc5a0 Mon Sep 17 00:00:00 2001 From: Li Lingfeng Date: Fri, 7 Apr 2023 10:25:29 +0800 Subject: [PATCH] block/wbt: enable wbt after switching cfq to other schedulers hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6LH5K CVE: NA -------------------------------- Commit 80061216078b ("block/wbt: fix negative inflight counter when remove scsi device") move wbt_enable_default() from elv_unregister_queue() to bfq_exit_queue(). As the result of it, wbt can't be enabled when we switch cfq to other schedulers. Fixes: 80061216078b ("block/wbt: fix negative inflight counter when remove scsi device") Signed-off-by: Li Lingfeng Reviewed-by: Yu Kuai Reviewed-by: Hou Tao Signed-off-by: Zhang Changzhong --- block/cfq-iosched.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 88bae553ece3..130854ad8cdb 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -4563,6 +4563,7 @@ static void cfq_exit_queue(struct elevator_queue *e) kfree(cfqd->root_group); #endif kfree(cfqd); + wbt_enable_default(q); } static int cfq_init_queue(struct request_queue *q, struct elevator_type *e) -- GitLab