summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_diskslice.c10
-rw-r--r--sys/kern/vfs_bio.c6
-rw-r--r--sys/kern/vfs_cluster.c4
3 files changed, 14 insertions, 6 deletions
diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c
index 644f136..bdc635e 100644
--- a/sys/kern/subr_diskslice.c
+++ b/sys/kern/subr_diskslice.c
@@ -43,7 +43,7 @@
* from: wd.c,v 1.55 1994/10/22 01:57:12 phk Exp $
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
- * $Id: subr_diskslice.c,v 1.55 1998/07/29 11:15:48 bde Exp $
+ * $Id: subr_diskslice.c,v 1.56 1998/07/30 15:16:05 bde Exp $
*/
#include "opt_devfs.h"
@@ -165,6 +165,7 @@ dscheck(bp, ssp)
daddr_t secno;
daddr_t slicerel_secno;
struct diskslice *sp;
+ int s;
blkno = bp->b_blkno;
if (blkno < 0) {
@@ -284,8 +285,11 @@ if (labelsect != 0) Debugger("labelsect != 0 in dscheck()");
* XXX probably need to copy the data to avoid even
* temporarily corrupting the in-core copy.
*/
- if (bp->b_vp != NULL)
+ if (bp->b_vp != NULL) {
+ s = splbio();
bp->b_vp->v_numoutput++;
+ splx(s);
+ }
/* XXX need name here. */
msg = fixlabel((char *)NULL, sp,
(struct disklabel *)
@@ -374,7 +378,7 @@ int
dsioctl(dname, dev, cmd, data, flags, sspp, strat, setgeom)
char *dname;
dev_t dev;
- int cmd;
+ u_long cmd;
caddr_t data;
int flags;
struct diskslices **sspp;
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);
/*
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 94da3f7..3f969ad 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
- * $Id: vfs_cluster.c,v 1.66 1998/07/29 17:38:14 bde Exp $
+ * $Id: vfs_cluster.c,v 1.67 1998/08/06 08:33:18 dfr Exp $
*/
#include "opt_debug_cluster.h"
@@ -798,11 +798,13 @@ cluster_wbuild(vp, size, start_lbn, len)
bp->b_bcount += size;
bp->b_bufsize += size;
+ s = splbio();
--numdirtybuffers;
tbp->b_flags &= ~(B_READ | B_DONE | B_ERROR | B_DELWRI);
tbp->b_flags |= B_ASYNC;
reassignbuf(tbp, tbp->b_vp); /* put on clean list */
++tbp->b_vp->v_numoutput;
+ splx(s);
TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
tbp, b_cluster.cluster_entry);
}
OpenPOWER on IntegriCloud