summaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-11-23 19:53:06 +0100
committerJens Axboe <axboe@kernel.dk>2021-11-29 06:38:44 -0700
commitf46b81c54b241bf1ec01c8936a37201c99f94fc7 (patch)
tree3305d4838ad50e349cadb0f101ae596a9be689c9 /block/elevator.c
parent0281ed3cf44d2a7061ec3c1680e1f86e55ad57b9 (diff)
downloadlinux-f46b81c54b241bf1ec01c8936a37201c99f94fc7.tar.bz2
block: remove elevator_exit
Open code elevator_exit in it's only caller, and rename __elevator_exit to elevator_exit. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20211123185312.1432157-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index 19a78d5516ba..3536cdd5fa12 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -188,7 +188,7 @@ static void elevator_release(struct kobject *kobj)
kfree(e);
}
-void __elevator_exit(struct request_queue *q, struct elevator_queue *e)
+void elevator_exit(struct request_queue *q, struct elevator_queue *e)
{
mutex_lock(&e->sysfs_lock);
blk_mq_exit_sched(q, e);
@@ -595,6 +595,7 @@ int elevator_switch_mq(struct request_queue *q,
elv_unregister_queue(q);
ioc_clear_queue(q);
+ blk_mq_sched_free_rqs(q);
elevator_exit(q, q->elevator);
}
@@ -605,6 +606,7 @@ int elevator_switch_mq(struct request_queue *q,
if (new_e) {
ret = elv_register_queue(q, true);
if (ret) {
+ blk_mq_sched_free_rqs(q);
elevator_exit(q, q->elevator);
goto out;
}