Commit ccf8b270 authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] io context leak on queue drain

If the drain flag is set on the queue, get_request() needs to drop the
acquired iocontext to avoid leaks.
Signed-off-by: default avatarJens Axboe <axboe@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 547afde1
......@@ -1651,7 +1651,7 @@ static struct request *get_request(request_queue_t *q, int rw, int gfp_mask)
struct io_context *ioc = get_io_context(gfp_mask);
if (unlikely(test_bit(QUEUE_FLAG_DRAIN, &q->queue_flags)))
return NULL;
goto out;
spin_lock_irq(q->queue_lock);
if (rl->count[rw]+1 >= q->nr_requests) {
......
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