summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-03-13 07:19:23 +0000
committerjeff <jeff@FreeBSD.org>2003-03-13 07:19:23 +0000
commitae3c8799daed67832db23a2957d5f5e47250cad9 (patch)
tree42c64ebfa800452a8af9d33feb3e347c047240a9 /sys/kern/vfs_subr.c
parent8ee94afd309724ae0e8434dc6ff0158da0d7addf (diff)
downloadFreeBSD-src-ae3c8799daed67832db23a2957d5f5e47250cad9.zip
FreeBSD-src-ae3c8799daed67832db23a2957d5f5e47250cad9.tar.gz
- Remove a race between fsync like functions and flushbufqueues() by
requiring locked bufs in vfs_bio_awrite(). Previously the buf could have been written out by fsync before we acquired the buf lock if it weren't for giant. The cluster_wbuild() handles this race properly but the single write at the end of vfs_bio_awrite() would not. - Modify flushbufqueues() so there is only one copy of the loop. Pass a parameter in that says whether or not we should sync bufs with deps. - Call flushbufqueues() a second time and then break if we couldn't find any bufs without deps.
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 5f4b678..3cedcb4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1240,7 +1240,6 @@ flushbuflist(blist, flags, vp, slpflag, slptimeo, errorp)
if (bp->b_vp == vp) {
if (bp->b_flags & B_CLUSTEROK) {
- BUF_UNLOCK(bp);
vfs_bio_awrite(bp);
} else {
bremfree(bp);
OpenPOWER on IntegriCloud