summaryrefslogtreecommitdiff
path: root/sys/boot/common
diff options
context:
space:
mode:
authorAndrey V. Elsukov <ae@FreeBSD.org>2012-09-30 07:52:40 +0000
committerAndrey V. Elsukov <ae@FreeBSD.org>2012-09-30 07:52:40 +0000
commit089afddef4fd86dc73fb788b8bf069333934ceb9 (patch)
tree944d17a6055ff44740f24a455bc01fc932ac71cf /sys/boot/common
parent2ccfa031299fa513bc6ac94cf24e8c4434ee713d (diff)
Notes
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/disk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/boot/common/disk.c b/sys/boot/common/disk.c
index 1fcaf2b9503b..73d58eac1046 100644
--- a/sys/boot/common/disk.c
+++ b/sys/boot/common/disk.c
@@ -373,7 +373,9 @@ disk_close(struct disk_devdesc *dev)
void
disk_cleanup(const struct devsw *d_dev)
{
+#ifdef DISK_DEBUG
struct disk_devdesc dev;
+#endif
struct dentry *entry, *tmp;
STAILQ_FOREACH_SAFE(entry, &opened_disks, entry, tmp) {
@@ -385,10 +387,10 @@ disk_cleanup(const struct devsw *d_dev)
dev.d_unit = entry->d_unit;
dev.d_slice = entry->d_slice;
dev.d_partition = entry->d_partition;
- STAILQ_REMOVE(&opened_disks, entry, dentry, entry);
DEBUG("%s was freed => %p [%d]", disk_fmtdev(&dev),
entry->od, entry->od->rcnt);
#endif
+ STAILQ_REMOVE(&opened_disks, entry, dentry, entry);
if (entry->od->rcnt < 1) {
if (entry->od->table != NULL)
ptable_close(entry->od->table);