Cannot rmmod after call to add_mtd_blktrans_dev

Maxim Levitsky maximlevitsky at gmail.com
Wed Sep 8 10:43:27 EDT 2010


On Wed, 2010-09-08 at 15:20 +0300, Jarkko Lavinen wrote: 
> 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

My fault, I take a good look at how to fix that differently.
Best regards,
Maxim Levitsky




More information about the linux-mtd mailing list