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 rev 1.29 from trunk (requested by wrstu...
details: https://anonhg.NetBSD.org/src/rev/18638d908892
branches: netbsd-1-4
changeset: 469598:18638d908892
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Oct 18 05:05:41 1999 +0000
description:
pull up rev 1.29 from trunk (requested by wrstuden):
In spec_close(), call the device's close routine with the vnode
unlocked if the call might block. Force a non-blocking close if
VXLOCK is set. This eliminates a potential deadlock situation, and
should eliminate the dirty buffers on reboot issue.
diffstat:
sys/uvm/uvm_swap.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r b9ad2efa02d4 -r 18638d908892 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c Mon Oct 18 05:05:34 1999 +0000
+++ b/sys/uvm/uvm_swap.c Mon Oct 18 05:05:41 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_swap.c,v 1.27 1999/03/30 16:07:47 chs Exp $ */
+/* $NetBSD: uvm_swap.c,v 1.27.2.1 1999/10/18 05:05:41 cgd Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
@@ -1049,8 +1049,11 @@
/*
* failure: close device if necessary and return error.
*/
- if (vp != rootvp)
+ if (vp != rootvp) {
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(vp, FREAD|FWRITE, p->p_ucred, p);
+ VOP_UNLOCK(vp, 0);
+ }
return (error);
}
@@ -1099,8 +1102,11 @@
extent_destroy(sdp->swd_ex);
free(name, M_VMSWAP);
free((caddr_t)sdp->swd_ex, M_VMSWAP);
- if (sdp->swp_vp != rootvp)
+ if (sdp->swp_vp != rootvp) {
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
(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