summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2007-07-11 15:32:23 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2007-07-11 15:32:23 +0000
commitcac0e705f4953514a55b807f91deab667c430d78 (patch)
tree0a60d5a6c21dc46e19f70b006cbbadd0b0e52ca6 /sys
parent4b04e60c842c4155e256bc62000c2546a4405d38 (diff)
Bring back the change in rev 1.70, it is safe now:
Propagate the wait flag from fsync down to softdep_fsync_mountdev() and do not perform synchronous sync there is no wait requested by skipping the drain_output() call. This fixes a problem where update kthread would sleep forever on some vnode since work is created faster than it can be flushed. OK deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/ufs/ffs/ffs_softdep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c
index fa7678027f6..ec2960a9acc 100644
--- a/sys/ufs/ffs/ffs_softdep.c
+++ b/sys/ufs/ffs/ffs_softdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_softdep.c,v 1.91 2007/06/01 20:23:26 pedro Exp $ */
+/* $OpenBSD: ffs_softdep.c,v 1.92 2007/07/11 15:32:22 millert Exp $ */
/*
* Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved.
@@ -4718,7 +4718,8 @@ softdep_fsync_mountdev(vp, waitfor)
*/
nbp = LIST_FIRST(&vp->v_dirtyblkhd);
}
- drain_output(vp, 1);
+ if (waitfor == MNT_WAIT)
+ drain_output(vp, 1);
FREE_LOCK(&lk);
}