Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/ufs/ext2fs pull up rev 1.28 from trunk (requested b...
details: https://anonhg.NetBSD.org/src/rev/c77aa26b4e83
branches: netbsd-1-4
changeset: 469596:c77aa26b4e83
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Oct 18 05:05:30 1999 +0000
description:
pull up rev 1.28 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/ufs/ext2fs/ext2fs_vfsops.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r fffb020f3fbd -r c77aa26b4e83 sys/ufs/ext2fs/ext2fs_vfsops.c
--- a/sys/ufs/ext2fs/ext2fs_vfsops.c Mon Oct 18 05:05:25 1999 +0000
+++ b/sys/ufs/ext2fs/ext2fs_vfsops.c Mon Oct 18 05:05:30 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_vfsops.c,v 1.24.2.1 1999/06/21 23:03:07 perry Exp $ */
+/* $NetBSD: ext2fs_vfsops.c,v 1.24.2.2 1999/10/18 05:05:30 cgd Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@@ -609,7 +609,9 @@
out:
if (bp)
brelse(bp);
+ vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
(void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);
+ VOP_UNLOCK(devvp, 0);
if (ump) {
free(ump->um_e2fs, M_UFSMNT);
free(ump, M_UFSMNT);
@@ -645,9 +647,10 @@
(void) ext2fs_sbupdate(ump, MNT_WAIT);
}
ump->um_devvp->v_specflags &= ~SI_MOUNTEDON;
+ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_CLOSE(ump->um_devvp, fs->e2fs_ronly ? FREAD : FREAD|FWRITE,
NOCRED, p);
- vrele(ump->um_devvp);
+ vput(ump->um_devvp);
free(fs->e2fs_gd, M_UFSMNT);
free(fs, M_UFSMNT);
free(ump, M_UFSMNT);
Home |
Main Index |
Thread Index |
Old Index