diff options
author | Yufen Yu <yuyufen@huawei.com> | 2020-10-09 06:26:27 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-10-09 21:34:06 +0300 |
commit | dd1c372d656600234a1704f456f9977ca684865c (patch) | |
tree | 5f50e1b2f9d6fd2e0c8eca64330e8bcdcd4064d8 /block/elevator.c | |
parent | 7ea6bf2e6c409e245a31b9ac6a4ba24949ad442f (diff) | |
download | linux-dd1c372d656600234a1704f456f9977ca684865c.tar.xz |
block: invoke blk_mq_exit_sched no matter whether have .exit_sched
We will register debugfs for scheduler no matter whether it have
defined callback funciton .exit_sched. So, blk_mq_exit_sched()
is always needed to unregister debugfs. Also, q->elevator should
be set as NULL after exiting scheduler.
For now, since all register scheduler have defined .exit_sched,
it will not cause any actual problem. But It will be more reasonable
to do this change.
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/elevator.c b/block/elevator.c index 90ed7a28c21d..7d76b61e157a 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -191,8 +191,7 @@ static void elevator_release(struct kobject *kobj) void __elevator_exit(struct request_queue *q, struct elevator_queue *e) { mutex_lock(&e->sysfs_lock); - if (e->type->ops.exit_sched) - blk_mq_exit_sched(q, e); + blk_mq_exit_sched(q, e); mutex_unlock(&e->sysfs_lock); kobject_put(&e->kobj); |