Skip to content

Commit

Permalink
UBI: Don't exit from ubi_thread until kthread_should_stop() is true
Browse files Browse the repository at this point in the history
If ubi_thread() exits but kthread_should_stop() is not true
then kthread_stop() will never return and cleanup thread
will forever stay in "D" state.

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Vitaliy Gusev authored and Artem Bityutskiy committed Nov 6, 2008
1 parent b77bcb0 commit 2ad4988
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mtd/ubi/wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,8 @@ int ubi_thread(void *u)
ubi_msg("%s: %d consecutive failures",
ubi->bgt_name, WL_MAX_FAILURES);
ubi_ro_mode(ubi);
break;
ubi->thread_enabled = 0;
continue;
}
} else
failures = 0;
Expand Down

0 comments on commit 2ad4988

Please sign in to comment.