diff options
Diffstat (limited to 'block/elevator.c')
-rw-r--r-- | block/elevator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c index cca049fb45c..91e18f8af9b 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -979,8 +979,9 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e) goto fail_register; } - /* done, replace the old one with new one and turn off BYPASS */ + /* done, clear io_cq's, switch elevators and turn off BYPASS */ spin_lock_irq(q->queue_lock); + ioc_clear_queue(q); old_elevator = q->elevator; q->elevator = e; spin_unlock_irq(q->queue_lock); |