Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Joakim Tjernlund and committed by
Linus Torvalds
967bf623 ba8379b2

+1 -1
+1 -1
drivers/mtd/chips/cfi_cmdset_0001.c
··· 1087 1087 } 1088 1088 spin_lock(chip->mutex); 1089 1089 1090 - if (chip->state != chip_state) { 1090 + while (chip->state != chip_state) { 1091 1091 /* Someone's suspended the operation: sleep */ 1092 1092 DECLARE_WAITQUEUE(wait, current); 1093 1093 set_current_state(TASK_UNINTERRUPTIBLE);