aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r--drivers/md/dm-snap.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 81f03a0e7838..018b567fc758 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1406,6 +1406,12 @@ static int __init dm_snapshot_init(void)
1406{ 1406{
1407 int r; 1407 int r;
1408 1408
1409 r = dm_exception_store_init();
1410 if (r) {
1411 DMERR("Failed to initialize exception stores");
1412 return r;
1413 }
1414
1409 r = dm_register_target(&snapshot_target); 1415 r = dm_register_target(&snapshot_target);
1410 if (r) { 1416 if (r) {
1411 DMERR("snapshot target register failed %d", r); 1417 DMERR("snapshot target register failed %d", r);
@@ -1454,17 +1460,17 @@ static int __init dm_snapshot_init(void)
1454 1460
1455 return 0; 1461 return 0;
1456 1462
1457 bad_pending_pool: 1463bad_pending_pool:
1458 kmem_cache_destroy(tracked_chunk_cache); 1464 kmem_cache_destroy(tracked_chunk_cache);
1459 bad5: 1465bad5:
1460 kmem_cache_destroy(pending_cache); 1466 kmem_cache_destroy(pending_cache);
1461 bad4: 1467bad4:
1462 kmem_cache_destroy(exception_cache); 1468 kmem_cache_destroy(exception_cache);
1463 bad3: 1469bad3:
1464 exit_origin_hash(); 1470 exit_origin_hash();
1465 bad2: 1471bad2:
1466 dm_unregister_target(&origin_target); 1472 dm_unregister_target(&origin_target);
1467 bad1: 1473bad1:
1468 dm_unregister_target(&snapshot_target); 1474 dm_unregister_target(&snapshot_target);
1469 return r; 1475 return r;
1470} 1476}
@@ -1480,6 +1486,8 @@ static void __exit dm_snapshot_exit(void)
1480 kmem_cache_destroy(pending_cache); 1486 kmem_cache_destroy(pending_cache);
1481 kmem_cache_destroy(exception_cache); 1487 kmem_cache_destroy(exception_cache);
1482 kmem_cache_destroy(tracked_chunk_cache); 1488 kmem_cache_destroy(tracked_chunk_cache);
1489
1490 dm_exception_store_exit();
1483} 1491}
1484 1492
1485/* Module hooks */ 1493/* Module hooks */