[PATCH] L18 flash corruption fix
Another fix to the put_chip() concurrency logic. Problem was occurring when: 1) one thread was erasing a block in partition x; 2) another thread suspended the erase in order to write to partition y; 3) a third thread came along to read a different block from partition x and, when it called put_chip(), chip->oldstate was FL_ERASING and the erase (mistakenly) resumed; 4) the write in partition y obviously failed at that point. Incidentally, the fix for this problem also fixed the case where suspending writes for MTD XIP usage was not working properly. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment