From: Vitaliy Gusev Date: Wed, 5 Nov 2008 15:27:18 +0000 (+0300) Subject: UBI: Don't exit from ubi_thread until kthread_should_stop() is true X-Git-Tag: v2.6.28-rc7~51^2 X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=2ad49887150894b9ed6a87a76b409adceee6b074;hp=b77bcb07897f1a9cd9d1d78691896dcdb0fd1a22;p=linux-2.6-omap-h63xx.git UBI: Don't exit from ubi_thread until kthread_should_stop() is true 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 Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 05d70937b54..dcb6dac1dc5 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -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;