Commit fd782a4a99d2d3e818b9465c427b10f7f027d7da
Committed by
Linus Torvalds
1 parent
541cecac53
Exists in
master
and in
7 other branches
[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>
Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff
drivers/block/ll_rw_blk.c
... | ... | @@ -1917,10 +1917,9 @@ |
1917 | 1917 | * limit of requests, otherwise we could have thousands of requests |
1918 | 1918 | * allocated with any setting of ->nr_requests |
1919 | 1919 | */ |
1920 | - if (rl->count[rw] >= (3 * q->nr_requests / 2)) { | |
1921 | - spin_unlock_irq(q->queue_lock); | |
1920 | + if (rl->count[rw] >= (3 * q->nr_requests / 2)) | |
1922 | 1921 | goto out; |
1923 | - } | |
1922 | + | |
1924 | 1923 | rl->count[rw]++; |
1925 | 1924 | rl->starved[rw] = 0; |
1926 | 1925 | if (rl->count[rw] >= queue_congestion_on_threshold(q)) |