aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-rw-r--r--drivers/md/dm-ioctl.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index ed8585954a3a..4d4ced8e4307 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1131,28 +1131,9 @@ static int populate_table(struct dm_table *table,
1131 next = spec->next; 1131 next = spec->next;
1132 } 1132 }
1133 1133
1134 r = dm_table_set_type(table);
1135 if (r) {
1136 DMWARN("unable to set table type");
1137 return r;
1138 }
1139
1140 return dm_table_complete(table); 1134 return dm_table_complete(table);
1141} 1135}
1142 1136
1143static int table_prealloc_integrity(struct dm_table *t,
1144 struct mapped_device *md)
1145{
1146 struct list_head *devices = dm_table_get_devices(t);
1147 struct dm_dev_internal *dd;
1148
1149 list_for_each_entry(dd, devices, list)
1150 if (bdev_get_integrity(dd->dm_dev.bdev))
1151 return blk_integrity_register(dm_disk(md), NULL);
1152
1153 return 0;
1154}
1155
1156static int table_load(struct dm_ioctl *param, size_t param_size) 1137static int table_load(struct dm_ioctl *param, size_t param_size)
1157{ 1138{
1158 int r; 1139 int r;
@@ -1174,21 +1155,6 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
1174 goto out; 1155 goto out;
1175 } 1156 }
1176 1157
1177 r = table_prealloc_integrity(t, md);
1178 if (r) {
1179 DMERR("%s: could not register integrity profile.",
1180 dm_device_name(md));
1181 dm_table_destroy(t);
1182 goto out;
1183 }
1184
1185 r = dm_table_alloc_md_mempools(t);
1186 if (r) {
1187 DMWARN("unable to allocate mempools for this table");
1188 dm_table_destroy(t);
1189 goto out;
1190 }
1191
1192 /* Protect md->type and md->queue against concurrent table loads. */ 1158 /* Protect md->type and md->queue against concurrent table loads. */
1193 dm_lock_md_type(md); 1159 dm_lock_md_type(md);
1194 if (dm_get_md_type(md) == DM_TYPE_NONE) 1160 if (dm_get_md_type(md) == DM_TYPE_NONE)