commit 967bf623e9f5eecfb056b1ba7e0efd74a21c9c3a
tree 256413b403e8aa720050e5da858c5d13a7c45869
parent ba8379b220509e9448c00a77cf6c15ac2a559cc7
author Joakim Tjernlund <[EMAIL PROTECTED]> 1164755512 +0000
committer Linus Torvalds <[EMAIL PROTECTED]> 1164763610 -0800

[PATCH] Fix Intel/Sharp command set erase suspend bug

When we sleep and wait for a suspended operation to be resumed, go
back and check until it's ready -- don't just continue after the first
time we're woken. This can cause file system corruption.

Signed-off-by: Joakim Tjernlund <[EMAIL PROTECTED]>
Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/mtd/chips/cfi_cmdset_0001.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c 
index 7ea49a0..296159e 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -1087,7 +1087,7 @@ static int inval_cache_and_wait_for_oper
-               if (chip->state != chip_state) {
+               while (chip->state != chip_state) {
                        /* Someone's suspended the operation: sleep */
                        DECLARE_WAITQUEUE(wait, current);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to