Daniel Rosenthal 63fd7f30f3 [MTD] [INFTL] Fix infinite loop in INFTL_foldchain
When iterating over a chain in reverse (oldest block first), this
patch correctly marks the PUtable[] entry of the second to last erase
block of a chain as BLOCK_NIL, regardless of whether or not it can
format the last block successfully. Before, the second to last block
was only marked as pointing to BLOCK_NIL if INFTL_formatblock()
succeeded on the last block of the chain, which could potentially
result in an infinite loop if the block was worn out and refused to
format.

Signed-off-by: Daniel Rosenthal <danielrosenthal@acm.org>
Acked-by: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-10-08 11:26:38 +01:00
..
2008-06-04 17:50:17 +01:00
2008-06-04 17:50:17 +01:00
2008-08-01 21:47:47 +01:00
2008-04-22 20:48:12 +01:00
2008-06-04 17:50:17 +01:00
2008-06-04 17:50:17 +01:00
2008-08-01 21:47:47 +01:00
2008-06-04 17:50:17 +01:00
2008-06-04 17:50:17 +01:00
2008-06-04 17:50:17 +01:00
2008-08-02 18:45:18 +01:00