aboutsummaryrefslogtreecommitdiffstats
path: root/block/elevator.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/elevator.c')
-rw-r--r--block/elevator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index cca049fb45c8..91e18f8af9be 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)
979 goto fail_register; 979 goto fail_register;
980 } 980 }
981 981
982 /* done, replace the old one with new one and turn off BYPASS */ 982 /* done, clear io_cq's, switch elevators and turn off BYPASS */
983 spin_lock_irq(q->queue_lock); 983 spin_lock_irq(q->queue_lock);
984 ioc_clear_queue(q);
984 old_elevator = q->elevator; 985 old_elevator = q->elevator;
985 q->elevator = e; 986 q->elevator = e;
986 spin_unlock_irq(q->queue_lock); 987 spin_unlock_irq(q->queue_lock);