[PATCH 2.6.35] mtd: blktrans: Move device and module ref-counting back to open/release

Maxim Levitsky maximlevitsky at gmail.com
Sat Jul 24 12:07:28 EDT 2010


This is done on purpose.

Otherwise, as soon as someone registers mtd translation layer with partitions,
the add_gendisk will scan partitions and thus call blktrans_open()
and mtd_table_mutex is already held.

Here I can unload both mtd and blktrans driver after mtd driver
removes mtd device (that happens when I remove the xD card)
While card is inserted its indeed not possible to remove nether mtd
nor translation layer driver.



More information about the linux-mtd mailing list