diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-06-29 16:15:40 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-29 17:46:30 +0200 |
commit | fd782a4a99d2d3e818b9465c427b10f7f027d7da (patch) | |
tree | 271bdff83dc68c7196c7319c18bd6292b5d177c5 /drivers/block | |
parent | Remove duplicate mention of "edd" in Documentation/kernel-parameters.txt (diff) | |
download | linux-fd782a4a99d2d3e818b9465c427b10f7f027d7da.tar.xz linux-fd782a4a99d2d3e818b9465c427b10f7f027d7da.zip |
[PATCH] Fix get_request nastiness
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/ll_rw_blk.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 1197462bb6ba..692a5fced76e 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -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)) |