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/ffs pull up rev 1.53 from trunk (requested by w...
details: https://anonhg.NetBSD.org/src/rev/b9ad2efa02d4
branches: netbsd-1-4
changeset: 469597:b9ad2efa02d4
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Oct 18 05:05:34 1999 +0000
description:
pull up rev 1.53 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/ffs/ffs_vfsops.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r c77aa26b4e83 -r b9ad2efa02d4 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Mon Oct 18 05:05:30 1999 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Mon Oct 18 05:05:34 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.49 1999/03/05 12:02:18 bouyer Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.49.2.1 1999/10/18 05:05:34 cgd Exp $ */
/*
* Copyright (c) 1989, 1991, 1993, 1994
@@ -621,7 +621,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, M_UFSMNT);
mp->mnt_data = (qaddr_t)0;
@@ -685,9 +687,10 @@
(void) ffs_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->fs_ronly ? FREAD : FREAD|FWRITE,
NOCRED, p);
- vrele(ump->um_devvp);
+ vput(ump->um_devvp);
free(fs->fs_csp[0], M_UFSMNT);
free(fs, M_UFSMNT);
free(ump, M_UFSMNT);
Home |
Main Index |
Thread Index |
Old Index