kernel/drivers/md/bcache/writeback.c
.. .. @@ -834,6 +834,16 @@ 834 834 if (ret < 0) 835 835 pr_warn("sectors dirty init failed, ret=%d!\n", ret); 836 836 837 + /*838 + * The op may be added to cache_set's btree_cache_wait839 + * in mca_cannibalize(), must ensure it is removed from840 + * the list and release btree_cache_alloc_lock before841 + * free op memory.842 + * Otherwise, the btree_cache_wait will be damaged.843 + */844 + bch_cannibalize_unlock(c);845 + finish_wait(&c->btree_cache_wait, &(&op.op)->wait);846 +837 847 return ret; 838 848 } 839 849