Message ID | 20230628010756.70649-2-yukuai1@huaweicloud.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | md/raid5-cache: fix a deadlock in r5l_exit_log() | expand |
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 47ba7d9e81e1..083288e36949 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -3168,13 +3168,12 @@ 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);