checking write_cached_data return status inside _release and _flush?
Jörn Engel
joern at wohnheim.fh-wedel.de
Mon Apr 10 06:02:52 EDT 2006
On Fri, 7 April 2006 20:03:13 +0200, Massimiliano Galanti wrote:
>
> i experienced some corruption of data on flash memories i am using, and
> discovered that this is related to these functions in mtdblock.c:
>
> static int mtdblock_release(struct mtd_blktrans_dev *mbd)
> static int mtdblock_flush(struct mtd_blktrans_dev *dev)
>
> not checking the return value of the function:
>
> write_cached_data(mtdblk)
>
> i fixed that by checking the return value inside a while cycle but is
> there any particular reason the original code is written that way?
Sounds like a plain bug. Can you send a patch?
Jörn
--
If you're willing to restrict the flexibility of your approach,
you can almost always do something better.
-- John Carmack
More information about the linux-mtd
mailing list