aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 0e2210c0c168..af1ceae2582a 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -267,6 +267,8 @@ static void free_devices(struct list_head *devices)
267 list_for_each_safe(tmp, next, devices) { 267 list_for_each_safe(tmp, next, devices) {
268 struct dm_dev_internal *dd = 268 struct dm_dev_internal *dd =
269 list_entry(tmp, struct dm_dev_internal, list); 269 list_entry(tmp, struct dm_dev_internal, list);
270 DMWARN("dm_table_destroy: dm_put_device call missing for %s",
271 dd->dm_dev.name);
270 kfree(dd); 272 kfree(dd);
271 } 273 }
272} 274}
@@ -296,12 +298,8 @@ void dm_table_destroy(struct dm_table *t)
296 vfree(t->highs); 298 vfree(t->highs);
297 299
298 /* free the device list */ 300 /* free the device list */
299 if (t->devices.next != &t->devices) { 301 if (t->devices.next != &t->devices)
300 DMWARN("devices still present during destroy: "
301 "dm_table_remove_device calls missing");
302
303 free_devices(&t->devices); 302 free_devices(&t->devices);
304 }
305 303
306 kfree(t); 304 kfree(t);
307} 305}