dm era: check for a non-NULL metadata object before closing it
authorJoe Thornber <ejt@redhat.com>
Tue, 11 Mar 2014 16:46:25 +0000 (16:46 +0000)
committerMike Snitzer <snitzer@redhat.com>
Tue, 3 Jun 2014 17:44:08 +0000 (13:44 -0400)
commit989f26f5ad308f40a95f280bf9cd75e558d4f18d
tree035bb4d59ddecce5f2f4f6d868f571cc056ea7d0
parentaf91805a497d3aa694704172b41ba953be3738ed
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: Joe Thornber <ejt@redhat.com>
Signed-off-by: Naohiro Aota <naota@elisp.net>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.15+
drivers/md/dm-era-target.c