diff options
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r-- | sys/kern/vfs_cluster.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index c5a3974c051..924b11f1403 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cluster.c,v 1.11 1997/11/06 05:58:26 csapuntz Exp $ */ +/* $OpenBSD: vfs_cluster.c,v 1.12 1998/01/08 15:51:56 csapuntz Exp $ */ /* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */ /*- @@ -698,6 +698,13 @@ redo: panic("Clustered write to wrong blocks"); } + /* + * We might as well AGE the buffer here; it's either empty, or + * contains data that we couldn't get rid of (but wanted to). + */ + tbp->b_flags &= ~(B_READ | B_DONE | B_ERROR | B_DELWRI); + tbp->b_flags |= (B_ASYNC | B_AGE); + if (LIST_FIRST(&tbp->b_dep) != NULL && bioops.io_start) (*bioops.io_start)(tbp); @@ -706,12 +713,7 @@ redo: bp->b_bufsize += size; tbp->b_bufsize -= size; - tbp->b_flags &= ~(B_READ | B_DONE | B_ERROR | B_DELWRI); - /* - * We might as well AGE the buffer here; it's either empty, or - * contains data that we couldn't get rid of (but wanted to). - */ - tbp->b_flags |= (B_ASYNC | B_AGE); + s = splbio(); reassignbuf(tbp, tbp->b_vp); /* put on clean list */ ++tbp->b_vp->v_numoutput; |