Message ID | 20220608162756.144600-8-logang@deltatee.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Bug fixes for mdadm tests | expand |
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index b1fc65e113f8..ca57b5fac599 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -3165,12 +3165,13 @@ void r5l_exit_log(struct r5conf *conf) { struct r5l_log *log = conf->log; - conf->log = NULL; - /* Ensure disable_writeback_work wakes up and exits */ wake_up(&conf->mddev->sb_wait); flush_work(&log->disable_writeback_work); md_unregister_thread(&log->reclaim_thread); + + conf->log = NULL; + mempool_exit(&log->meta_pool); bioset_exit(&log->bs); mempool_exit(&log->io_pool);