Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a664d0f0 authored by Slava Pestov's avatar Slava Pestov Committed by Kent Overstreet
Browse files

bcache: fix crash on shutdown in passthrough mode

We never started the writeback thread in this case, so don't stop it.
parent e5112201
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1071,6 +1071,7 @@ static void cached_dev_free(struct closure *cl)
	struct cached_dev *dc = container_of(cl, struct cached_dev, disk.cl);

	cancel_delayed_work_sync(&dc->writeback_rate_update);
	if (!IS_ERR_OR_NULL(dc->writeback_thread))
		kthread_stop(dc->writeback_thread);

	mutex_lock(&bch_register_lock);