summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-09-10 14:17:10 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 19:15:12 +0200
commit35797132b311b3b7d4add48393b0a03f3566cbc1 (patch)
tree8b2dee69a4f6b881e22815e9710c479ba853f6fc /drivers
parent[PATCH] ppc32: support hotplug cpu on powermacs (diff)
downloadlinux-35797132b311b3b7d4add48393b0a03f3566cbc1.tar.xz
linux-35797132b311b3b7d4add48393b0a03f3566cbc1.zip
[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')
-rw-r--r--drivers/block/cfq-iosched.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c
index 30c0903c7cdd..cd056e7e64ec 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)
if (!atomic_dec_and_test(&cfqd->ref))
return;
+ blk_put_queue(q);
+
cfq_shutdown_timer_wq(cfqd);
q->elevator->elevator_data = NULL;
@@ -2316,6 +2318,7 @@ static int cfq_init_queue(request_queue_t *q, elevator_t *e)
e->elevator_data = cfqd;
cfqd->queue = q;
+ atomic_inc(&q->refcnt);
cfqd->max_queued = q->nr_requests / 4;
q->nr_batching = cfq_queued;