public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Block: Fix blk_start_queueing() so as not to process a stopped queue
@ 2008-09-30 23:19 Elias Oltmanns
  2008-10-01  7:48 ` Jens Axboe
  0 siblings, 1 reply; 3+ messages in thread
From: Elias Oltmanns @ 2008-09-30 23:19 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel

Especially since blk_start_queueing() is used as the unplug_fn() callback
by the cfq scheduler, we'd better make it behave like a proper unplug
function. That is to say, return immediately if the queue is stopped.

Cc: stable <stable@kernel.org>
Signed-off-by: Elias Oltmanns <eo@nebensachen.de>
---
This is not a recent regression, so it might not be accepted as an rc
fix. However, it most definitely is a bug and should go into a stable
release. Applies to 2.6.27-rc8.

 block/blk-core.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 2cba5ef..f9a0bfb 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -888,9 +888,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);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-02 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-30 23:19 Block: Fix blk_start_queueing() so as not to process a stopped queue Elias Oltmanns
2008-10-01  7:48 ` Jens Axboe
2008-10-02 15:55   ` Elias Oltmanns

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox