summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-12-10 21:46:59 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-12-10 21:46:59 +0000
commit3355c8c983a8923b015cbdcef2b87de65aefada5 (patch)
tree63a338649a9305b84e0057deaeea822c2ddc2d10
parent23a70e50b43e59a16025f1048560c80285954902 (diff)
vfs_unmountall: retry to unmount all remaining filesystems when one unmount failed
-rw-r--r--sys/kern/vfs_subr.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 2e012441016..c75f30c2972 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_subr.c,v 1.27 1998/12/05 16:50:40 csapuntz Exp $ */
+/* $OpenBSD: vfs_subr.c,v 1.28 1998/12/10 21:46:58 art Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@@ -771,6 +771,7 @@ vput(vp)
vputonfreelist(vp);
VOP_INACTIVE(vp, p);
+
simple_unlock(&vp->v_interlock);
}
@@ -1682,8 +1683,9 @@ void
vfs_unmountall()
{
register struct mount *mp, *nmp;
- int allerror, error;
+ int allerror, error, again = 1;
+ retry:
for (allerror = 0,
mp = mountlist.cqh_last; mp != (void *)&mountlist; mp = nmp) {
nmp = mp->mnt_list.cqe_prev;
@@ -1693,8 +1695,15 @@ vfs_unmountall()
allerror = 1;
}
}
- if (allerror)
+
+ if (allerror) {
printf("WARNING: some file systems would not unmount\n");
+ if (again) {
+ printf("retrying\n");
+ again = 0;
+ goto retry;
+ }
+ }
}
/*