]> Pileus Git - ~andy/linux/blobdiff - drivers/md/persistent-data/dm-space-map-disk.c
Merge remote-tracking branch 'spi/fix/grant' into spi-linus
[~andy/linux] / drivers / md / persistent-data / dm-space-map-disk.c
index 3d0ed53328831627ab6ec79cb85946f36b0fe7a4..e735a6d5a793dfff9c71330fd7555469d5a58501 100644 (file)
@@ -4,7 +4,6 @@
  * This file is released under the GPL.
  */
 
-#include "dm-space-map-checker.h"
 #include "dm-space-map-common.h"
 #include "dm-space-map-disk.h"
 #include "dm-space-map.h"
@@ -249,12 +248,12 @@ static struct dm_space_map ops = {
        .new_block = sm_disk_new_block,
        .commit = sm_disk_commit,
        .root_size = sm_disk_root_size,
-       .copy_root = sm_disk_copy_root
+       .copy_root = sm_disk_copy_root,
+       .register_threshold_callback = NULL
 };
 
-static struct dm_space_map *dm_sm_disk_create_real(
-       struct dm_transaction_manager *tm,
-       dm_block_t nr_blocks)
+struct dm_space_map *dm_sm_disk_create(struct dm_transaction_manager *tm,
+                                      dm_block_t nr_blocks)
 {
        int r;
        struct sm_disk *smd;
@@ -285,27 +284,10 @@ bad:
        kfree(smd);
        return ERR_PTR(r);
 }
-
-struct dm_space_map *dm_sm_disk_create(struct dm_transaction_manager *tm,
-                                      dm_block_t nr_blocks)
-{
-       struct dm_space_map *sm = dm_sm_disk_create_real(tm, nr_blocks);
-       struct dm_space_map *smc;
-
-       if (IS_ERR_OR_NULL(sm))
-               return sm;
-
-       smc = dm_sm_checker_create_fresh(sm);
-       if (IS_ERR(smc))
-               dm_sm_destroy(sm);
-
-       return smc;
-}
 EXPORT_SYMBOL_GPL(dm_sm_disk_create);
 
-static struct dm_space_map *dm_sm_disk_open_real(
-       struct dm_transaction_manager *tm,
-       void *root_le, size_t len)
+struct dm_space_map *dm_sm_disk_open(struct dm_transaction_manager *tm,
+                                    void *root_le, size_t len)
 {
        int r;
        struct sm_disk *smd;
@@ -332,13 +314,6 @@ bad:
        kfree(smd);
        return ERR_PTR(r);
 }
-
-struct dm_space_map *dm_sm_disk_open(struct dm_transaction_manager *tm,
-                                    void *root_le, size_t len)
-{
-       return dm_sm_checker_create(
-               dm_sm_disk_open_real(tm, root_le, len));
-}
 EXPORT_SYMBOL_GPL(dm_sm_disk_open);
 
 /*----------------------------------------------------------------*/