Skip to content

Commit

Permalink
block: Fix blk_start_queueing() to not kick a stopped queue
Browse files Browse the repository at this point in the history
blk_start_queueing() should act like the generic queue unplugging
and kicking and ignore a stopped queue. Such a queue may not be
run until after a call to blk_start_queue().

Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Elias Oltmanns authored and Jens Axboe committed Oct 9, 2008
1 parent c0ddffa commit 336c3d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,9 +890,11 @@ EXPORT_SYMBOL(blk_get_request);
*/
void blk_start_queueing(struct request_queue *q)
{
if (!blk_queue_plugged(q))
if (!blk_queue_plugged(q)) {
if (unlikely(blk_queue_stopped(q)))
return;
q->request_fn(q);
else
} else
__generic_unplug_device(q);
}
EXPORT_SYMBOL(blk_start_queueing);
Expand Down

0 comments on commit 336c3d8

Please sign in to comment.