BUG: missing get_mtd_device when running cat /dev/mtdblock*
Josh Boyer
jwboyer at gmail.com
Mon Jul 31 11:05:52 EDT 2006
On 7/31/06, Jörn Engel <joern at wohnheim.fh-wedel.de> wrote:
> While debugging on a 2.6.5 kernel (with fairly recent mtd) I noticed
> that mtdblock appears to be bypassing get_mtd_device().
Yes, it bypasses calling that. But...
> Can anyone verify this on current mtd by adding a simple printk() to
> get_mtd_device() and running cat /dev/mtdblock0 > /dev/null or so?
>
> I am assuming this is not desired behaviour and should get fixed.
It seems mtd_blkdevs.c handles the reference counting itself. See
blktrans_open. Most certainly this could be changed to call
get_mtd_device instead, but I believe all the locking is correct as it
stands.
Might want to double check though.
josh
More information about the linux-mtd
mailing list