summaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorYufen Yu <yuyufen@huawei.com>2020-10-09 05:26:27 +0200
committerJens Axboe <axboe@kernel.dk>2020-10-09 20:34:06 +0200
commitdd1c372d656600234a1704f456f9977ca684865c (patch)
tree5f50e1b2f9d6fd2e0c8eca64330e8bcdcd4064d8 /block/blk-sysfs.c
parentpercpu_ref: don't refer to ref->data if it isn't allocated (diff)
downloadlinux-dd1c372d656600234a1704f456f9977ca684865c.tar.xz
linux-dd1c372d656600234a1704f456f9977ca684865c.zip
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/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 76b54c7750b0..e35eb1a05ad2 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -740,7 +740,6 @@ static void blk_exit_queue(struct request_queue *q)
if (q->elevator) {
ioc_clear_queue(q);
__elevator_exit(q, q->elevator);
- q->elevator = NULL;
}
/*