diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2006-11-29 00:11:52 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-11-29 02:26:50 +0100 |
commit | 967bf623e9f5eecfb056b1ba7e0efd74a21c9c3a (patch) | |
tree | 256413b403e8aa720050e5da858c5d13a7c45869 /drivers/mtd/chips | |
parent | [PATCH] bridge: fix possible overflow in get_fdb_entries (diff) | |
download | linux-967bf623e9f5eecfb056b1ba7e0efd74a21c9c3a.tar.xz linux-967bf623e9f5eecfb056b1ba7e0efd74a21c9c3a.zip |
[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 <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/mtd/chips')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 7ea49a0d5ec3..296159ec5189 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_operation( } spin_lock(chip->mutex); - if (chip->state != chip_state) { + while (chip->state != chip_state) { /* Someone's suspended the operation: sleep */ DECLARE_WAITQUEUE(wait, current); set_current_state(TASK_UNINTERRUPTIBLE); |