mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 17:41:50 +00:00
[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>
This commit is contained in:
parent
541cecac53
commit
fd782a4a99
1 changed files with 2 additions and 3 deletions
|
@ -1917,10 +1917,9 @@ get_rq:
|
||||||
* limit of requests, otherwise we could have thousands of requests
|
* limit of requests, otherwise we could have thousands of requests
|
||||||
* allocated with any setting of ->nr_requests
|
* allocated with any setting of ->nr_requests
|
||||||
*/
|
*/
|
||||||
if (rl->count[rw] >= (3 * q->nr_requests / 2)) {
|
if (rl->count[rw] >= (3 * q->nr_requests / 2))
|
||||||
spin_unlock_irq(q->queue_lock);
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
rl->count[rw]++;
|
rl->count[rw]++;
|
||||||
rl->starved[rw] = 0;
|
rl->starved[rw] = 0;
|
||||||
if (rl->count[rw] >= queue_congestion_on_threshold(q))
|
if (rl->count[rw] >= queue_congestion_on_threshold(q))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue