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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 1c871736f48c..7f77f18fcafa 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1050,6 +1050,12 @@ static int populate_table(struct dm_table *table,
1050 next = spec->next; 1050 next = spec->next;
1051 } 1051 }
1052 1052
1053 r = dm_table_set_type(table);
1054 if (r) {
1055 DMWARN("unable to set table type");
1056 return r;
1057 }
1058
1053 return dm_table_complete(table); 1059 return dm_table_complete(table);
1054} 1060}
1055 1061
@@ -1095,6 +1101,13 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
1095 goto out; 1101 goto out;
1096 } 1102 }
1097 1103
1104 r = dm_table_alloc_md_mempools(t);
1105 if (r) {
1106 DMWARN("unable to allocate mempools for this table");
1107 dm_table_destroy(t);
1108 goto out;
1109 }
1110
1098 down_write(&_hash_lock); 1111 down_write(&_hash_lock);
1099 hc = dm_get_mdptr(md); 1112 hc = dm_get_mdptr(md);
1100 if (!hc || hc->md != md) { 1113 if (!hc || hc->md != md) {