diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-06-25 15:49:27 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-06-25 15:49:27 +0000 |
commit | 76b6aacf60d37639f946fe7c18eba405f282e980 (patch) | |
tree | 1c9e03957a54b2006f8bbda1f3d6f26d73c2556e /sys/kern | |
parent | acb0cca6a4b9cfbd09f6f68cb75c95df1bf3cf23 (diff) |
backout the buf_acquire() does the bremfree() since all callers
where doing bremfree() befure calling buf_acquire().
This is causing us headache pinning down a bug that showed up
when deraadt@ too cvs to current, and will have to be done
anyway as a preperation for backouts.
OK deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/spec_vnops.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_bio.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_biomem.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 5 |
4 files changed, 10 insertions, 6 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c index ed5a617a7d6..c846d54ff70 100644 --- a/sys/kern/spec_vnops.c +++ b/sys/kern/spec_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spec_vnops.c,v 1.54 2009/06/06 18:06:22 art Exp $ */ +/* $OpenBSD: spec_vnops.c,v 1.55 2009/06/25 15:49:26 thib Exp $ */ /* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */ /* @@ -439,6 +439,7 @@ loop: continue; if ((bp->b_flags & B_DELWRI) == 0) panic("spec_fsync: not dirty"); + bremfree(bp); buf_acquire(bp); splx(s); bawrite(bp); diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 0e7c21786ec..1322bb93feb 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.117 2009/06/15 17:01:26 beck Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.118 2009/06/25 15:49:26 thib Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /*- @@ -812,6 +812,7 @@ start: if (!ISSET(bp->b_flags, B_INVAL)) { bcstats.cachehits++; SET(bp->b_flags, B_CACHE); + bremfree(bp); buf_acquire(bp); splx(s); return (bp); @@ -973,6 +974,7 @@ buf_daemon(struct proc *p) if (bcstats.numdirtypages < lodirtypages) break; + bremfree(bp); buf_acquire(bp); splx(s); diff --git a/sys/kern/vfs_biomem.c b/sys/kern/vfs_biomem.c index ac9eaf95e25..89ab5f4d114 100644 --- a/sys/kern/vfs_biomem.c +++ b/sys/kern/vfs_biomem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_biomem.c,v 1.8 2009/06/16 00:11:29 oga Exp $ */ +/* $OpenBSD: vfs_biomem.c,v 1.9 2009/06/25 15:49:26 thib Exp $ */ /* * Copyright (c) 2007 Artur Grabowski <art@openbsd.org> * @@ -80,12 +80,10 @@ buf_acquire(struct buf *bp) KASSERT((bp->b_flags & B_BUSY) == 0); s = splbio(); - /* * Busy before waiting for kvm. */ SET(bp->b_flags, B_BUSY); - bremfree(bp); buf_map(bp); splx(s); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4d09d4f20a0..4b19f59ef2a 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.178 2009/06/15 17:01:26 beck Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.179 2009/06/25 15:49:26 thib Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1687,6 +1687,7 @@ vfs_syncwait(int verbose) */ if (bp->b_flags & B_DELWRI) { s = splbio(); + bremfree(bp); buf_acquire(bp); splx(s); nbusy++; @@ -1857,6 +1858,7 @@ loop: } break; } + bremfree(bp); buf_acquire(bp); /* * XXX Since there are no node locks for NFS, I believe @@ -1894,6 +1896,7 @@ loop: continue; if ((bp->b_flags & B_DELWRI) == 0) panic("vflushbuf: not dirty"); + bremfree(bp); buf_acquire(bp); splx(s); /* |