mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
blk-mq-sched: fix crash in switch error path
In elevator_switch(), if blk_mq_init_sched() fails, we attempt to fall back to the original scheduler. However, at this point, we've already torn down the original scheduler's tags, so this causes a crash. Doing the fallback like the legacy elevator path is much harder for mq, so fix it by just falling back to none, instead. Signed-off-by: Omar Sandoval <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
93252632e8
commit
54d5329d42
6 changed files with 67 additions and 48 deletions
|
|
@ -816,7 +816,7 @@ static void blk_release_queue(struct kobject *kobj)
|
|||
|
||||
if (q->elevator) {
|
||||
ioc_clear_queue(q);
|
||||
elevator_exit(q->elevator);
|
||||
elevator_exit(q, q->elevator);
|
||||
}
|
||||
|
||||
blk_exit_rl(&q->root_rl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue