checking write_cached_data return status inside _release and _flush?

Massimiliano Galanti massiblue at libero.it
Fri Apr 7 14:03:13 EDT 2006


hi!

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?

Thank you.

-- 
Massimiliano Galanti

-IM-----------------------
MSN:  viperzed at hotmail.com
Yahoo: massimilianogalanti
ICQ:             227544335
Skype: massimilianogalanti
--------------------------





More information about the linux-mtd mailing list