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

Commit 989f26f5 authored by Joe Thornber's avatar Joe Thornber Committed by Mike Snitzer
Browse files

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: default avatarJoe Thornber <ejt@redhat.com>
Signed-off-by: default avatarNaohiro Aota <naota@elisp.net>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.15+
parent af91805a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1391,6 +1391,7 @@ static int era_is_congested(struct dm_target_callbacks *cb, int bdi_bits)

static void era_destroy(struct era *era)
{
	if (era->md)
		metadata_close(era->md);

	if (era->wq)