dm cache: destroy migration_cache if cache target registration failed
authorShenghui Wang <shhuiw@foxmail.com>
Sun, 7 Oct 2018 06:45:41 +0000 (14:45 +0800)
committerMike Snitzer <snitzer@redhat.com>
Tue, 9 Oct 2018 17:53:03 +0000 (13:53 -0400)
commitc7cd55504a5b0fc826a2cd9540845979d24ae542
tree4a9cff7ad26a5797094f792bed90ccb5695f6247
parent0238df646e6224016a45505d2c111a24669ebe21
dm cache: destroy migration_cache if cache target registration failed

Commit 7e6358d244e47 ("dm: fix various targets to dm_register_target
after module __init resources created") inadvertently introduced this
bug when it moved dm_register_target() after the call to KMEM_CACHE().

Fixes: 7e6358d244e47 ("dm: fix various targets to dm_register_target after module __init resources created")
Cc: stable@vger.kernel.org
Signed-off-by: Shenghui Wang <shhuiw@foxmail.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-target.c