linux-stable-rt/drivers/block
Brian King 38f1852759 [PATCH] block: CFQ refcounting fix
I ran across a memory leak related to the cfq scheduler. The cfq
init function increments the refcnt of the associated request_queue.

This refcount gets decremented in cfq's exit function. Since blk_cleanup_queue
only calls the elevator exit function when its refcnt goes to zero, the
request_q never gets cleaned up. It didn't look like other io schedulers were
incrementing this refcnt, so I removed the refcnt increment and it fixed the
memory leak for me.

To reproduce the problem, simply use cfq and use the scsi_host scan sysfs
attribute to scan "- - -" repeatedly on a scsi host and watch the memory
vanish.

Signed-off-by: Brian King <brking@us.ibm.com>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:39 -07:00
..
aoe [NET]: Kill skb->real_dev 2005-08-29 15:32:25 -07:00
paride
DAC960.c
DAC960.h
Kconfig Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild 2005-09-06 00:35:51 -07:00
Kconfig.iosched
Makefile
acsi.c
acsi_slm.c
amiflop.c
as-iosched.c [PATCH] as-iosched tunable encoding fix 2005-07-27 16:25:50 -07:00
ataflop.c
cciss.c [PATCH] cciss per disk queue 2005-07-28 08:39:01 -07:00
cciss.h [PATCH] cciss per disk queue 2005-07-28 08:39:01 -07:00
cciss_cmd.h
cciss_scsi.c
cciss_scsi.h
cfq-iosched.c [PATCH] block: CFQ refcounting fix 2005-09-07 16:57:39 -07:00
cpqarray.c
cpqarray.h
cryptoloop.c [CRYPTO]: Use CRYPTO_TFM_REQ_MAY_SLEEP where appropriate 2005-09-01 17:43:25 -07:00
deadline-iosched.c [PATCH] cleanup of deadline_dispatch_requests() 2005-09-07 16:57:28 -07:00
elevator.c [PATCH] Update cfq io scheduler to time sliced design 2005-06-27 14:33:29 -07:00
floppy.c [PATCH] Floppy: add cmos attribute to floppy driver tidy 2005-09-05 16:03:11 -07:00
genhd.c [PATCH] Add missing overflow check in get_blkdev_list 2005-09-07 16:57:30 -07:00
ida_cmd.h
ida_ioctl.h
ioctl.c
ll_rw_blk.c [PATCH] blk: Use blk_queue_xxx functions to set parameters 2005-09-07 16:57:34 -07:00
loop.c
nbd.c
noop-iosched.c
pktcdvd.c
ps2esdi.c
rd.c
scsi_ioctl.c
smart1,2.h
swim3.c [PATCH] ppc32: Remove CONFIG_PMAC_PBOOK 2005-06-27 15:11:43 -07:00
swim_iop.c
sx8.c [PATCH] turn many #if $undefined_string into #ifdef $undefined_string 2005-07-27 16:26:08 -07:00
ub.c [PATCH] ub: fix for blank CDs 2005-07-27 16:25:52 -07:00
umem.c
viodasd.c [PATCH] Make MODULE_DEVICE_TABLE work for vio devices 2005-08-30 13:31:56 +10:00
xd.c
xd.h
z2ram.c