提交 a664d0f0 编写于 作者: S Slava Pestov 提交者: Kent Overstreet

bcache: fix crash on shutdown in passthrough mode

We never started the writeback thread in this case, so don't stop it.
上级 e5112201
...@@ -1071,7 +1071,8 @@ static void cached_dev_free(struct closure *cl) ...@@ -1071,7 +1071,8 @@ static void cached_dev_free(struct closure *cl)
struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl); struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl);
cancel_delayed_work_sync(&dc->writeback_rate_update); cancel_delayed_work_sync(&dc->writeback_rate_update);
kthread_stop(dc->writeback_thread); if (!IS_ERR_OR_NULL(dc->writeback_thread))
kthread_stop(dc->writeback_thread);
mutex_lock(&bch_register_lock); mutex_lock(&bch_register_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册