提交 967bf623 编写于 作者: J Joakim Tjernlund 提交者: Linus Torvalds

[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: NJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 ba8379b2
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册