diff options
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_disks.c | 3 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c index 328fe2613e6..4308602f2ff 100644 --- a/sys/dev/raidframe/rf_disks.c +++ b/sys/dev/raidframe/rf_disks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.31 2000/06/02 01:17:14 oster Exp $ */ +/* $NetBSD: rf_disks.c,v 1.32 2000/09/08 01:36:35 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -568,6 +568,7 @@ rf_AutoConfigureDisks(raidPtr, cfgPtr, auto_config) ac = auto_config; while(ac!=NULL) { if (ac->flag == 0) { + vn_lock(ac->vp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(ac->vp, FREAD, NOCRED, 0); vput(ac->vp); ac->vp = NULL; diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 8a5aa5c4ac2..850e9f97529 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.95 2000/08/19 18:20:07 oster Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.96 2000/09/08 01:36:36 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -2445,6 +2445,7 @@ rf_close_component(raidPtr, vp, auto_configured) if (vp != NULL) { if (auto_configured == 1) { + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(vp, FREAD, NOCRED, 0); vput(vp); @@ -2664,6 +2665,7 @@ if (raidautoconfig) { /* don't need this any more. We'll allocate it again a little later if we really do... */ + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(vp, FREAD, NOCRED, 0); vput(vp); @@ -2729,6 +2731,7 @@ if (raidautoconfig) { if (!good_one) { /* cleanup */ free(clabel, M_RAIDFRAME); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(vp, FREAD, NOCRED, 0); vput(vp); } @@ -3122,6 +3125,7 @@ rf_release_all_vps(cset) while(ac!=NULL) { /* Close the vp, and give it back */ if (ac->vp) { + vn_lock(ac->vp, LK_EXCLUSIVE | LK_RETRY); VOP_CLOSE(ac->vp, FREAD, NOCRED, 0); vput(ac->vp); ac->vp = NULL; |
