diff options
author | dfr <dfr@FreeBSD.org> | 1998-08-13 08:09:08 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1998-08-13 08:09:08 +0000 |
commit | cb85cf3e66942eabeff656173ac75b9275fa61fe (patch) | |
tree | 0f2c440ae29cf3c8695d77275be9d3ffe4f4a18a /sys/kern/vfs_bio.c | |
parent | a1b2079000fa319fd6e9ee79ceb8d15d4bbd55d5 (diff) | |
download | FreeBSD-src-cb85cf3e66942eabeff656173ac75b9275fa61fe.zip FreeBSD-src-cb85cf3e66942eabeff656173ac75b9275fa61fe.tar.gz |
Protect all modifications to v_numoutput with splbio().
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index e1cb45a..8a759c0 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -11,7 +11,7 @@ * 2. Absolutely no warranty of function or purpose is made by the author * John S. Dyson. * - * $Id: vfs_bio.c,v 1.167 1998/07/13 07:05:55 bde Exp $ + * $Id: vfs_bio.c,v 1.168 1998/08/06 08:33:18 dfr Exp $ */ /* @@ -366,7 +366,7 @@ breadn(struct vnode * vp, daddr_t blkno, int size, int bwrite(struct buf * bp) { - int oldflags; + int oldflags, s; struct vnode *vp; struct mount *mp; @@ -386,6 +386,7 @@ bwrite(struct buf * bp) bp->b_flags &= ~(B_READ | B_DONE | B_ERROR | B_DELWRI); bp->b_flags |= B_WRITEINPROG; + s = splbio(); if ((oldflags & B_DELWRI) == B_DELWRI) { --numdirtybuffers; reassignbuf(bp, bp->b_vp); @@ -395,6 +396,7 @@ bwrite(struct buf * bp) vfs_busy_pages(bp, 1); if (curproc != NULL) curproc->p_stats->p_ru.ru_oublock++; + splx(s); VOP_STRATEGY(bp->b_vp, bp); /* |