aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugh Dickins2005-06-29 09:15:40 -0500
committerLinus Torvalds2005-06-29 10:46:30 -0500
commitfd782a4a99d2d3e818b9465c427b10f7f027d7da (patch)
tree271bdff83dc68c7196c7319c18bd6292b5d177c5 /drivers/block/ll_rw_blk.c
parent541cecac534ea0df95fbc76b0a3091e91b101895 (diff)
downloadkernel-common-fd782a4a99d2d3e818b9465c427b10f7f027d7da.tar.gz
kernel-common-fd782a4a99d2d3e818b9465c427b10f7f027d7da.tar.xz
kernel-common-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/ll_rw_blk.c')
-rw-r--r--drivers/block/ll_rw_blk.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index 1197462bb6b..692a5fced76 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -1917,10 +1917,9 @@ get_rq:
1917 * limit of requests, otherwise we could have thousands of requests 1917 * limit of requests, otherwise we could have thousands of requests
1918 * allocated with any setting of ->nr_requests 1918 * allocated with any setting of ->nr_requests
1919 */ 1919 */
1920 if (rl->count[rw] >= (3 * q->nr_requests / 2)) { 1920 if (rl->count[rw] >= (3 * q->nr_requests / 2))
1921 spin_unlock_irq(q->queue_lock);
1922 goto out; 1921 goto out;
1923 } 1922
1924 rl->count[rw]++; 1923 rl->count[rw]++;
1925 rl->starved[rw] = 0; 1924 rl->starved[rw] = 0;
1926 if (rl->count[rw] >= queue_congestion_on_threshold(q)) 1925 if (rl->count[rw] >= queue_congestion_on_threshold(q))