Cannot rmmod after call to add_mtd_blktrans_dev

Jarkko Lavinen jarkko.lavinen at nokia.com
Wed Sep 8 08:20:39 EDT 2010


I am working with mtdswap driver which uses
add_mtd_blktrans_dev().  Once I call add_mtd_blktrans_dev() the
driver module reference count is 1 and I cannot remove the
module.

Before commit 048d871 (mtd: blktrans: Hotplug fixes) the module
ref count was 0 after loading. Ref count was increased only when
thedevice was opened and it was possible to remove the module if
none was using it.

After the 048d871 it doesn't seem to be possible to remove
drivers which use add_mtd_blktrans_dev().  Many drivers similar
to ftl have ftl_remove_dev() which calls del_mtd_blktrans_dev()
that would put the module but cannot be called unless the ref
count is already 0.

Jarkko Lavinen



More information about the linux-mtd mailing list