summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2003-12-15 00:44:05 +0000
committergrog <grog@FreeBSD.org>2003-12-15 00:44:05 +0000
commit53cb42cc7c307a9b8705b972b45881e065cd0a91 (patch)
tree9a454cd174d728cf384db5699829adb1c64c94ed /sys/dev/vinum
parentfc3a1fcb367b7fb1660d6fc171237cccfc5b182e (diff)
downloadFreeBSD-src-53cb42cc7c307a9b8705b972b45881e065cd0a91.zip
FreeBSD-src-53cb42cc7c307a9b8705b972b45881e065cd0a91.tar.gz
free_plex, free_volume: Don't try to destroy the underlying device if
it doesn't exist. This can occur under certain failure situations.
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinumconfig.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinumconfig.c b/sys/dev/vinum/vinumconfig.c
index 88e8914..8227485 100644
--- a/sys/dev/vinum/vinumconfig.c
+++ b/sys/dev/vinum/vinumconfig.c
@@ -823,7 +823,8 @@ free_plex(int plexno)
Free(plex->sdnos);
if (plex->lock)
Free(plex->lock);
- destroy_dev(plex->dev);
+ if (plex->dev)
+ destroy_dev(plex->dev);
bzero(plex, sizeof(struct plex)); /* and clear it out */
plex->state = plex_unallocated;
}
@@ -894,7 +895,8 @@ free_volume(int volno)
struct volume *vol;
vol = &VOL[volno];
- destroy_dev(vol->dev);
+ if (vol->dev)
+ destroy_dev(vol->dev);
bzero(vol, sizeof(struct volume)); /* and clear it out */
vol->state = volume_unallocated;
}
OpenPOWER on IntegriCloud