summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/raidframe/rf_openbsdkintf.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c
index e60386cb935..97079e13204 100644
--- a/sys/dev/raidframe/rf_openbsdkintf.c
+++ b/sys/dev/raidframe/rf_openbsdkintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rf_openbsdkintf.c,v 1.27 2004/11/28 02:47:14 pedro Exp $ */
+/* $OpenBSD: rf_openbsdkintf.c,v 1.28 2005/09/18 14:18:18 pedro Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */
/*-
@@ -2596,18 +2596,15 @@ rf_update_component_labels(RF_Raid_t *raidPtr, int final)
void
rf_close_component(RF_Raid_t *raidPtr, struct vnode *vp, int auto_configured)
{
- struct proc *p;
-
- if ((p = raidPtr->engine_thread) == NULL)
- p = curproc;
+ struct proc *p = curproc;
if (vp != NULL) {
if (auto_configured == 1) {
- VOP_CLOSE(vp, FREAD | FWRITE, NOCRED, p);
+ /* component was opened by rf_find_raid_components() */
+ VOP_CLOSE(vp, FREAD | FWRITE, NOCRED, NULL);
vrele(vp);
} else {
- if (VOP_ISLOCKED(vp))
- VOP_UNLOCK(vp, 0, p);
+ /* component was opened by raidlookup() */
(void) vn_close(vp, FREAD | FWRITE, p->p_ucred, p);
}
} else {