diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-14 06:36:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-14 06:36:25 +0000 |
commit | 97c2ad7ec9a9b072a227742a9ba66fe6478b2665 (patch) | |
tree | 82eb7b28057c2f5f31ae609fdeea8a132757bcd5 /sys/kern | |
parent | 685d2666a544322370a7d281966b8c23f17ecd8b (diff) |
from pk; protect some more stuff with splbio
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index bc7ce981dc3..d0d1b1efd0a 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,5 +1,5 @@ -/* $OpenBSD: vfs_bio.c,v 1.6 1996/06/11 03:25:13 tholo Exp $ */ -/* $NetBSD: vfs_bio.c,v 1.43 1996/04/22 01:38:59 christos Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.7 1996/06/14 06:36:24 deraadt Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /*- * Copyright (c) 1994 Christopher G. Demetriou @@ -283,7 +283,7 @@ int bwrite(bp) struct buf *bp; { - int rv, sync, wasdelayed; + int rv, sync, wasdelayed, s; /* * Remember buffer type, to switch on it later. If the write was @@ -307,6 +307,7 @@ bwrite(bp) if (wasdelayed) TAILQ_REMOVE(&bdirties, bp, b_synclist); + s = splbio(); if (!sync) { /* * If not synchronous, pay for the I/O operation and make @@ -321,8 +322,9 @@ bwrite(bp) } /* Initiate disk write. Make sure the appropriate party is charged. */ - SET(bp->b_flags, B_WRITEINPROG); bp->b_vp->v_numoutput++; + splx(s); + SET(bp->b_flags, B_WRITEINPROG); VOP_STRATEGY(bp); if (sync) { @@ -336,10 +338,12 @@ bwrite(bp) * make sure it's on the correct vnode queue. (async operatings * were payed for above.) */ + s = splbio(); if (wasdelayed) reassignbuf(bp, bp->b_vp); else curproc->p_stats->p_ru.ru_oublock++; + splx(s); /* Release the buffer. */ brelse(bp); |