提交 07932a02 编写于 作者: X Xiubo Li 提交者: Nicholas Bellinger

tcmu: Fix module removal due to stuck unmap_thread thread again

Because the unmap code just after the schdule() returned may take
a long time and if the kthread_stop() is fired just when in this
routine, the module removal maybe stuck too.
Signed-off-by: NXiubo Li <lixiubo@cmss.chinamobile.com>
Reviewed-by: NMike Christie <mchristi@redhat.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 1d6ef276
......@@ -1707,7 +1707,7 @@ static int unmap_thread_fn(void *data)
struct page *page;
int i;
while (1) {
while (!kthread_should_stop()) {
DEFINE_WAIT(__wait);
prepare_to_wait(&unmap_wait, &__wait, TASK_INTERRUPTIBLE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册