diff options
author | Greg Lehey <grog@FreeBSD.org> | 1999-03-13 07:33:37 +0000 |
---|---|---|
committer | Greg Lehey <grog@FreeBSD.org> | 1999-03-13 07:33:37 +0000 |
commit | 1a049f96aba272bef263efdc28a80d6d362eda04 (patch) | |
tree | 0690868fa24102a06db6865bf64a87b6ae707c32 | |
parent | b1356c97c601886285d5c2f99ac4aaef44d64b37 (diff) | |
download | src-1a049f96aba272bef263efdc28a80d6d362eda04.tar.gz src-1a049f96aba272bef263efdc28a80d6d362eda04.zip |
Don't frob vp->v_usecount, it scares the hell out of the driver under
certain circumstances.
Notes
Notes:
svn path=/head/; revision=44706
-rw-r--r-- | sys/dev/vinum/vinumio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c index cee55d89f8f6..64cb3d06ecdb 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]; |