Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 967bf623 authored by Joakim Tjernlund's avatar Joakim Tjernlund Committed by Linus Torvalds
Browse files

[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: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ba8379b2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);