summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_default.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_default.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_default.c')
-rw-r--r--sys/kern/vfs_default.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index 1921abf..58f1a86 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -749,7 +749,6 @@ loop2:
if ((bp->b_flags & B_DELWRI) == 0)
panic("fsync: not dirty");
if ((vp->v_vflag & VV_OBJBUF) && (bp->b_flags & B_CLUSTEROK)) {
- BUF_UNLOCK(bp);
vfs_bio_awrite(bp);
splx(s);
} else {
OpenPOWER on IntegriCloud