summaryrefslogtreecommitdiff
path: root/sys/ufs/mfs
diff options
context:
space:
mode:
authorEric Jackson <ericj@cvs.openbsd.org>2002-02-18 09:23:27 +0000
committerEric Jackson <ericj@cvs.openbsd.org>2002-02-18 09:23:27 +0000
commit12d45204b3298ad0d91b106713e9500f7b9cd287 (patch)
tree59a3bcd325ecb0f9f86886d49b16932d731ad587 /sys/ufs/mfs
parenta55ac2b49563afa203010fca038fa20bff911d4d (diff)
fix possible panic on reboot for mfs mounted fs.
fix from NetBSD pr#1693 art@ OK
Diffstat (limited to 'sys/ufs/mfs')
-rw-r--r--sys/ufs/mfs/mfs_vfsops.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/ufs/mfs/mfs_vfsops.c b/sys/ufs/mfs/mfs_vfsops.c
index aed5baf5a34..63259f5408e 100644
--- a/sys/ufs/mfs/mfs_vfsops.c
+++ b/sys/ufs/mfs/mfs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfs_vfsops.c,v 1.16 2002/01/23 01:40:59 art Exp $ */
+/* $OpenBSD: mfs_vfsops.c,v 1.17 2002/02/18 09:23:26 ericj Exp $ */
/* $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */
/*
@@ -259,6 +259,7 @@ mfs_start(mp, flags, p)
register struct mfsnode *mfsp = VTOMFS(vp);
register struct buf *bp;
register caddr_t base;
+ int sleepreturn = 0;
base = mfsp->mfs_baseoff;
while (mfsp->mfs_buflist != (struct buf *)-1) {
@@ -275,11 +276,14 @@ mfs_start(mp, flags, p)
* otherwise we will loop here, as tsleep will always return
* EINTR/ERESTART.
*/
- if (tsleep((caddr_t)vp, mfs_pri, "mfsidl", 0)) {
+ if (sleepreturn != 0) {
if (vfs_busy(mp, LK_NOWAIT, NULL, p) ||
dounmount(mp, 0, p))
CLRSIG(p, CURSIG(p));
+ sleepreturn = 0;
+ continue;
}
+ sleepreturn = tsleep((caddr_t)vp, mfs_pri, "mfsidl", 0);
}
return (0);
}