Skip to content

Commit

Permalink
[BLOCK] elevator: run queue in elevator_switch
Browse files Browse the repository at this point in the history
elevator_dispatch needs to run queue after forced dispatching;
otherwise, the queue might stall.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Nov 12, 2005
1 parent 47a0041 commit 407df2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions block/elevator.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,8 @@ static void elevator_switch(request_queue_t *q, struct elevator_type *new_e)
;

while (q->rq.elvpriv) {
blk_remove_plug(q);
q->request_fn(q);
spin_unlock_irq(q->queue_lock);
msleep(10);
spin_lock_irq(q->queue_lock);
Expand Down

0 comments on commit 407df2a

Please sign in to comment.