summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJonthan Brassow <jbrassow@redhat.com>2009-06-22 11:12:29 +0200
committerAlasdair G Kergon <agk@redhat.com>2009-06-22 11:12:29 +0200
commit1b6da754594e6e26c24e6fbc1a34f9c03e4617a3 (patch)
tree713b521ab6f0769752c57bebb7c10621abc09cea /drivers
parentdm mpath: add service time load balancer (diff)
downloadlinux-1b6da754594e6e26c24e6fbc1a34f9c03e4617a3.tar.xz
linux-1b6da754594e6e26c24e6fbc1a34f9c03e4617a3.zip
dm table: improve warning message when devices not freed before destruction
Report any devices forgotten to be freed before a table is destroyed. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers')
-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)
list_for_each_safe(tmp, next, devices) {
struct dm_dev_internal *dd =
list_entry(tmp, struct dm_dev_internal, list);
+ DMWARN("dm_table_destroy: dm_put_device call missing for %s",
+ dd->dm_dev.name);
kfree(dd);
}
}
@@ -296,12 +298,8 @@ void dm_table_destroy(struct dm_table *t)
vfree(t->highs);
/* free the device list */
- if (t->devices.next != &t->devices) {
- DMWARN("devices still present during destroy: "
- "dm_table_remove_device calls missing");
-
+ if (t->devices.next != &t->devices)
free_devices(&t->devices);
- }
kfree(t);
}