提交 989f26f5 编写于 作者: J Joe Thornber 提交者: Mike Snitzer

dm era: check for a non-NULL metadata object before closing it

era_ctr() may call era_destroy() before era->md is initialized so
era_destory() must only close the metadata object if it is not NULL.
Signed-off-by: NJoe Thornber <ejt@redhat.com>
Signed-off-by: NNaohiro Aota <naota@elisp.net>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.15+
上级 af91805a
......@@ -1391,7 +1391,8 @@ static int era_is_congested(struct dm_target_callbacks *cb, int bdi_bits)
static void era_destroy(struct era *era)
{
metadata_close(era->md);
if (era->md)
metadata_close(era->md);
if (era->wq)
destroy_workqueue(era->wq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册