]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
UBI: Don't exit from ubi_thread until kthread_should_stop() is true
authorVitaliy Gusev <vgusev@openvz.org>
Wed, 5 Nov 2008 15:27:18 +0000 (18:27 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 6 Nov 2008 09:13:04 +0000 (11:13 +0200)
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>
drivers/mtd/ubi/wl.c

index 05d70937b54322d8ecd878d05cc69e084ef4a5ed..dcb6dac1dc5446b4966d85ef8e6d8e1db5ed9dcb 100644 (file)
@@ -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;