diff options
author | Jens Axboe <axboe@suse.de> | 2005-09-10 08:17:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 13:15:12 -0400 |
commit | 35797132b311b3b7d4add48393b0a03f3566cbc1 (patch) | |
tree | 8b2dee69a4f6b881e22815e9710c479ba853f6fc /drivers/block/cfq-iosched.c | |
parent | 31139971b3dc9fbb2e8a8572fb81e6e8470f363a (diff) |
[PATCH] cfq-iosched: reverse bad reference count fix
The reference count fix merged isn't fully bug free. It doesn't leak
now, but instead it crashes due to looking at freed memory. So for now,
lets reverse the change and I'll fix it for real next week.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block/cfq-iosched.c')
-rw-r--r-- | drivers/block/cfq-iosched.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index 30c0903c7cd..cd056e7e64e 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c | |||
@@ -2260,6 +2260,8 @@ static void cfq_put_cfqd(struct cfq_data *cfqd) | |||
2260 | if (!atomic_dec_and_test(&cfqd->ref)) | 2260 | if (!atomic_dec_and_test(&cfqd->ref)) |
2261 | return; | 2261 | return; |
2262 | 2262 | ||
2263 | blk_put_queue(q); | ||
2264 | |||
2263 | cfq_shutdown_timer_wq(cfqd); | 2265 | cfq_shutdown_timer_wq(cfqd); |
2264 | q->elevator->elevator_data = NULL; | 2266 | q->elevator->elevator_data = NULL; |
2265 | 2267 | ||
@@ -2316,6 +2318,7 @@ static int cfq_init_queue(request_queue_t *q, elevator_t *e) | |||
2316 | e->elevator_data = cfqd; | 2318 | e->elevator_data = cfqd; |
2317 | 2319 | ||
2318 | cfqd->queue = q; | 2320 | cfqd->queue = q; |
2321 | atomic_inc(&q->refcnt); | ||
2319 | 2322 | ||
2320 | cfqd->max_queued = q->nr_requests / 4; | 2323 | cfqd->max_queued = q->nr_requests / 4; |
2321 | q->nr_batching = cfq_queued; | 2324 | q->nr_batching = cfq_queued; |