summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1999-03-13 07:33:37 +0000
committergrog <grog@FreeBSD.org>1999-03-13 07:33:37 +0000
commitd74441502e6e691ef48957a05c9c6a4e423eb3c1 (patch)
tree49cb7e5431efe2f060a4aa3bb07b1cbbee77d69f
parent6ed0096f2d88f0a666ce7e2108396bb6c712f30f (diff)
downloadFreeBSD-src-d74441502e6e691ef48957a05c9c6a4e423eb3c1.zip
FreeBSD-src-d74441502e6e691ef48957a05c9c6a4e423eb3c1.tar.gz
Don't frob vp->v_usecount, it scares the hell out of the driver under
certain circumstances.
-rw-r--r--sys/dev/vinum/vinumio.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c
index cee55d8..64cb3d0 100644
--- a/sys/dev/vinum/vinumio.c
+++ b/sys/dev/vinum/vinumio.c
@@ -87,7 +87,6 @@ open_drive(struct drive *drive, struct proc *p, int verbose)
"open_drive %s: use count %d, ignoring\n", /* XXX where does this come from? */
drive->devicename,
drive->vp->v_usecount);
- drive->vp->v_usecount = 1; /* will this work? */
}
error = VOP_GETATTR(drive->vp, &va, NOCRED, drive->p);
if (error) {
@@ -218,13 +217,11 @@ close_drive(struct drive *drive)
if (drive->vp) {
lockdrive(drive); /* keep the daemon out */
vn_close(drive->vp, FREAD | FWRITE, NOCRED, drive->p);
- if (drive->vp->v_usecount) { /* XXX shouldn't happen */
+ if (drive->vp->v_usecount) /* XXX shouldn't happen */
log(LOG_WARNING,
"close_drive %s: use count still %d\n",
drive->devicename,
drive->vp->v_usecount);
- drive->vp->v_usecount = 0; /* will this work? */
- }
drive->vp = NULL;
unlockdrive(drive);
}
@@ -532,7 +529,7 @@ check_drive(char *drivename)
}
for (i = 0; i < vinum_conf.drives_allocated; i++) { /* see if the name already exists */
if ((i != driveno) /* not this drive */
- &&(DRIVE[i].state != drive_unallocated) /* and it's allocated */
+&&(DRIVE[i].state != drive_unallocated) /* and it's allocated */
&&(strcmp(DRIVE[i].label.name,
DRIVE[driveno].label.name) == 0)) { /* and it has the same name */
struct drive *mydrive = &DRIVE[i];
OpenPOWER on IntegriCloud