commit 048d87199566663e4edc4880df3703c04bcf41d9 "mtd: blktrans: Hotplug fixes" causes the MTD and the MTD driver module's ref-counts to be bumped for each block device that is created, whether or not it's actually in use. This means that before removing an MTD or driver module one must first remove all the associated block devices. But the block devices will be removed only when the MTDs themselves are removed, which is no longer possible. I have submitted a fix for this: http://article.gmane.org/gmane.linux.drivers.mtd/30834
Maxim, 048d87199566663e4edc4880df3703c04bcf41d9 was yours..
Yes, I am aware of this problem. It has to be done that way, because otherwise I had an impossible to solve deadlock. The blktrans_open() doesn't use locks on purpose, this is a part of the fix of the deadlock. I explain that better tommorow, when I finish last exam.
The parent devices of the MTDs can still be removed, and once that has been done it is possible to remove a MTD driver module. So although there is a regression here it is not as serious as I thought.