public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6.13-rc1 get_request nastiness
@ 2005-06-29 14:15 Hugh Dickins
  2005-06-29 17:58 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Hugh Dickins @ 2005-06-29 14:15 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Jens Axboe, linux-kernel

get_request is now expected to be holding on to queue_lock, with interrupts
disabled, when it returns NULL; but one path forgot that, causing all kinds
of nastiness under swap load - badness backtraces, strange failures, BUGs.

Signed-off-by: Hugh Dickins <hugh@veritas.com>

--- 2.6.13-rc1/drivers/block/ll_rw_blk.c	2005-06-29 11:54:08.000000000 +0100
+++ linux/drivers/block/ll_rw_blk.c	2005-06-29 14:41:04.000000000 +0100
@@ -1917,10 +1917,9 @@ get_rq:
 	 * limit of requests, otherwise we could have thousands of requests
 	 * allocated with any setting of ->nr_requests
 	 */
-	if (rl->count[rw] >= (3 * q->nr_requests / 2)) {
-		spin_unlock_irq(q->queue_lock);
+	if (rl->count[rw] >= (3 * q->nr_requests / 2))
 		goto out;
-	}
+
 	rl->count[rw]++;
 	rl->starved[rw] = 0;
 	if (rl->count[rw] >= queue_congestion_on_threshold(q))

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

end of thread, other threads:[~2005-06-29 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 14:15 [PATCH] 2.6.13-rc1 get_request nastiness Hugh Dickins
2005-06-29 17:58 ` Jens Axboe

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