Source-Changes-HG archive

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

[src/trunk]: src/sys/uvm Revert rev 1.28 -> 1.29. The VOP_CLOSE call was happ...



details:   https://anonhg.NetBSD.org/src/rev/04d68f9b6034
branches:  trunk
changeset: 480123:04d68f9b6034
user:      wrstuden <wrstuden%NetBSD.org@localhost>
date:      Tue Jan 04 21:37:54 2000 +0000

description:
Revert rev 1.28 -> 1.29. The VOP_CLOSE call was happeneing with the vnode
already locked, so don't lock it here.

diffstat:

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

diffs (35 lines):

diff -r fb0e9b87310d -r 04d68f9b6034 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Tue Jan 04 15:17:00 2000 +0000
+++ b/sys/uvm/uvm_swap.c        Tue Jan 04 21:37:54 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_swap.c,v 1.30 1999/11/15 18:49:15 fvdl Exp $       */
+/*     $NetBSD: uvm_swap.c,v 1.31 2000/01/04 21:37:54 wrstuden 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