summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/vinum/vinumconfig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinumconfig.c b/sys/dev/vinum/vinumconfig.c
index 416ac8f4f1..312e168 100644
--- a/sys/dev/vinum/vinumconfig.c
+++ b/sys/dev/vinum/vinumconfig.c
@@ -584,8 +584,10 @@ free_drive(struct drive *drive)
if ((drive->state > drive_referenced) /* real drive */
||(drive->vp)) { /* how can it be open without a state? */
LOCKDRIVE(drive);
- if (drive->vp) /* it's open, */
+ if (drive->vp) { /* it's open, */
close_locked_drive(drive); /* close it */
+ drive->state = drive_down; /* and note the fact */
+ }
if (drive->freelist)
Free(drive->freelist);
bzero(drive, sizeof(struct drive)); /* this also sets drive_unallocated */
OpenPOWER on IntegriCloud