Commit f67198fb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] handle OOM in get_request_wait()

From: Nick Piggin <piggin@cyberone.com.au>

If there are no requess in flight against the target device and
get_request() fails, nothing will wake us up.  Fix.
parent 08f36413
...@@ -1381,7 +1381,7 @@ static struct request *get_request_wait(request_queue_t *q, int rw) ...@@ -1381,7 +1381,7 @@ static struct request *get_request_wait(request_queue_t *q, int rw)
* no wakeup will be delivered. So now we're on the * no wakeup will be delivered. So now we're on the
* waitqueue, go check for that. * waitqueue, go check for that.
*/ */
rq = get_request(q, rw, GFP_ATOMIC & ~__GFP_HIGH); rq = get_request(q, rw, GFP_NOIO);
if (!rq) if (!rq)
io_schedule(); io_schedule();
finish_wait(&rl->wait[rw], &wait); finish_wait(&rl->wait[rw], &wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment