[PATCH] mtd: mtd_blkdevs: don't increase 'open' count on error path

Artem Bityutskiy dedekind1 at gmail.com
Thu Nov 17 16:35:06 EST 2011


On Mon, 2011-11-07 at 15:51 -0800, Brian Norris wrote:
> Some error paths in mtd_blkdevs were fixed in the following commit:
> 
>     commit 94735ec4044a6d318b83ad3c5794e931ed168d10
>     mtd: mtd_blkdevs: fix error path in blktrans_open
> 
> But on these error paths, the block device's `dev->open' count is
> already incremented before we check for errors. This meant that, while
> the error path was handled correctly on the first time through
> blktrans_open(), the device is erroneously considered already open on
> the second time through.

Pushed to l2-mtd-2.6.git, thanks!

Artem.




More information about the linux-mtd mailing list