]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | Subject: block: Fix blk_start_queueing() to not kick a stopped queue |
2 | From: Elias Oltmanns <eo@nebensachen.de> | |
3 | Date: Thu Oct 9 08:56:20 2008 +0200: | |
4 | Git: 336c3d8ce771608815b65bcfa27a17a83b297328 | |
5 | References: bnc#464155 | |
6 | ||
7 | blk_start_queueing() should act like the generic queue unplugging | |
8 | and kicking and ignore a stopped queue. Such a queue may not be | |
9 | run until after a call to blk_start_queue(). | |
10 | ||
11 | Signed-off-by: Elias Oltmanns <eo@nebensachen.de> | |
12 | Signed-off-by: Jens Axboe <jens.axboe@oracle.com> | |
13 | Signed-off-by: Hannes Reinecke <hare@suse.de> | |
14 | ||
15 | --- | |
16 | block/blk-core.c | 6 ++++-- | |
17 | 1 file changed, 4 insertions(+), 2 deletions(-) | |
18 | ||
19 | --- a/block/blk-core.c | |
20 | +++ b/block/blk-core.c | |
21 | @@ -905,9 +905,11 @@ EXPORT_SYMBOL(blk_get_request); | |
22 | */ | |
23 | void blk_start_queueing(struct request_queue *q) | |
24 | { | |
25 | - if (!blk_queue_plugged(q)) | |
26 | + if (!blk_queue_plugged(q)) { | |
27 | + if (unlikely(blk_queue_stopped(q))) | |
28 | + return; | |
29 | q->request_fn(q); | |
30 | - else | |
31 | + } else | |
32 | __generic_unplug_device(q); | |
33 | } | |
34 | EXPORT_SYMBOL(blk_start_queueing); |