Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/uvm Pull up revision 1.31 (requested by wrstuden):



details:   https://anonhg.NetBSD.org/src/rev/c9d8453cec9b
branches:  netbsd-1-4
changeset: 469996:c9d8453cec9b
user:      he <he%NetBSD.org@localhost>
date:      Sat Jan 08 18:43:28 2000 +0000

description:
Pull up revision 1.31 (requested by wrstuden):
  Revert a previous change regarding spec_close handling.  The
  vnode being closed was already locked, so do not try to re-lock.
  The result before this fix was that failed attempts at "swapon"
  would panic the machine.

diffstat:

 sys/uvm/uvm_swap.c |  12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diffs (35 lines):

diff -r 43c521ee1e36 -r c9d8453cec9b sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Sat Jan 08 18:35:58 2000 +0000
+++ b/sys/uvm/uvm_swap.c        Sat Jan 08 18:43:28 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_swap.c,v 1.27.2.1 1999/10/18 05:05:41 cgd Exp $    */
+/*     $NetBSD: uvm_swap.c,v 1.27.2.2 2000/01/08 18:43:28 he Exp $     */
 
 /*
  * Copyright (c) 1995, 1996, 1997 Matthew R. Green
@@ -1049,11 +1049,8 @@
        /*
         * failure: close device if necessary and return error.
         */
-       if (vp != rootvp) {
-               vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+       if (vp != rootvp)
                (void)VOP_CLOSE(vp, FREAD|FWRITE, p->p_ucred, p);
-               VOP_UNLOCK(vp, 0);
-       }
        return (error);
 }
 
@@ -1102,11 +1099,8 @@
        extent_destroy(sdp->swd_ex);
        free(name, M_VMSWAP);
        free((caddr_t)sdp->swd_ex, M_VMSWAP);
-       if (sdp->swp_vp != rootvp) {
-               vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+       if (sdp->swp_vp != rootvp)
                (void) VOP_CLOSE(sdp->swd_vp, FREAD|FWRITE, p->p_ucred, p);
-               VOP_UNLOCK(vp, 0);
-       }
        if (sdp->swd_vp)
                vrele(sdp->swd_vp);
        free((caddr_t)sdp, M_VMSWAP);



Home | Main Index | Thread Index | Old Index