diff options
author | Omar Sandoval <osandov@fb.com> | 2017-04-07 08:52:27 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-07 08:56:48 -0600 |
commit | 54d5329d425650fafaf90660a139c771d2d49cae (patch) | |
tree | 3fc6db73809742be0f0fdf403c77af02a6feeeba /include/linux/elevator.h | |
parent | 93252632e828da3e90241a1c0e766556abf71598 (diff) |
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 <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r-- | include/linux/elevator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index aebecc4ed088..22d39e8d4de1 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -211,7 +211,7 @@ extern ssize_t elv_iosched_show(struct request_queue *, char *); extern ssize_t elv_iosched_store(struct request_queue *, const char *, size_t); extern int elevator_init(struct request_queue *, char *); -extern void elevator_exit(struct elevator_queue *); +extern void elevator_exit(struct request_queue *, struct elevator_queue *); extern int elevator_change(struct request_queue *, const char *); extern bool elv_bio_merge_ok(struct request *, struct bio *); extern struct elevator_queue *elevator_alloc(struct request_queue *, |