diff options
author | grog <grog@FreeBSD.org> | 1999-08-16 05:09:39 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-08-16 05:09:39 +0000 |
commit | d398591cdddf5639c2e9d73750c2d6685b50675c (patch) | |
tree | b00fe772c667e75c21fdd7e5064d946e238c1c20 | |
parent | 92640f8ca572f8c9b889fbb9504917e6c4652616 (diff) | |
download | FreeBSD-src-d398591cdddf5639c2e9d73750c2d6685b50675c.zip FreeBSD-src-d398591cdddf5639c2e9d73750c2d6685b50675c.tar.gz |
free_drive: mark drive down. This may fix a panic in the 'start' command.
Reported-by: peter
-rw-r--r-- | sys/dev/vinum/vinumconfig.c | 4 |
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 */ |