Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/raidframe Pullup 1.31->1.32 of rf_disks.c



details:   https://anonhg.NetBSD.org/src/rev/ca7839f8688c
branches:  netbsd-1-5
changeset: 489406:ca7839f8688c
user:      oster <oster%NetBSD.org@localhost>
date:      Fri Sep 08 13:42:50 2000 +0000

description:
Pullup 1.31->1.32 of rf_disks.c
Pullup 1.95->1.96 of rf_netbsdkintf.c
Approved by: thorpej

Make sure we are passing a locked vp to VOP_CLOSE.

diffstat:

 sys/dev/raidframe/rf_disks.c       |  3 ++-
 sys/dev/raidframe/rf_netbsdkintf.c |  6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diffs (58 lines):

diff -r f7565bcc5ce0 -r ca7839f8688c sys/dev/raidframe/rf_disks.c
--- a/sys/dev/raidframe/rf_disks.c      Fri Sep 08 00:43:56 2000 +0000
+++ b/sys/dev/raidframe/rf_disks.c      Fri Sep 08 13:42:50 2000 +0000
@@ -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.31.2.1 2000/09/08 13:42:50 oster Exp $  */
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -568,6 +568,7 @@
        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 -r f7565bcc5ce0 -r ca7839f8688c sys/dev/raidframe/rf_netbsdkintf.c
--- a/sys/dev/raidframe/rf_netbsdkintf.c        Fri Sep 08 00:43:56 2000 +0000
+++ b/sys/dev/raidframe/rf_netbsdkintf.c        Fri Sep 08 13:42:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rf_netbsdkintf.c,v 1.92.2.3 2000/08/19 19:38:43 oster Exp $    */
+/*     $NetBSD: rf_netbsdkintf.c,v 1.92.2.4 2000/09/08 13:42:51 oster Exp $    */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -2445,6 +2445,7 @@
 
        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 @@
 
                /* 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 (!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 @@
        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;



Home | Main Index | Thread Index | Old Index