summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1998-07-08 01:04:33 +0000
committerJulian Elischer <julian@FreeBSD.org>1998-07-08 01:04:33 +0000
commit6deaf84b1fb56f29ac8bae22e9313aa71d86444f (patch)
tree6f5419d1450beb634c97ec948be83d1330f06e1f
parentb5fe8fabdac7fbabbd2993abfa16e14570173a8c (diff)
Notes
-rw-r--r--sys/gnu/ext2fs/ext2_readwrite.c3
-rw-r--r--sys/gnu/fs/ext2fs/ext2_readwrite.c3
-rw-r--r--sys/kern/vfs_bio.c7
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c11
4 files changed, 15 insertions, 9 deletions
diff --git a/sys/gnu/ext2fs/ext2_readwrite.c b/sys/gnu/ext2fs/ext2_readwrite.c
index b49666afe1ba..7efe39afe4a0 100644
--- a/sys/gnu/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/ext2fs/ext2_readwrite.c
@@ -254,7 +254,8 @@ WRITE(ap)
error =
uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
- if (ioflag & IO_VMIO)
+ if ((ioflag & IO_VMIO) &&
+ (LIST_FIRST(&bp->b_dep) == NULL)) /* in ext2fs? */
bp->b_flags |= B_RELBUF;
if (ioflag & IO_SYNC) {
diff --git a/sys/gnu/fs/ext2fs/ext2_readwrite.c b/sys/gnu/fs/ext2fs/ext2_readwrite.c
index b49666afe1ba..7efe39afe4a0 100644
--- a/sys/gnu/fs/ext2fs/ext2_readwrite.c
+++ b/sys/gnu/fs/ext2fs/ext2_readwrite.c
@@ -254,7 +254,8 @@ WRITE(ap)
error =
uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
- if (ioflag & IO_VMIO)
+ if ((ioflag & IO_VMIO) &&
+ (LIST_FIRST(&bp->b_dep) == NULL)) /* in ext2fs? */
bp->b_flags |= B_RELBUF;
if (ioflag & IO_SYNC) {
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index f494f73c1a0e..6f8088311deb 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.164 1998/05/01 15:10:59 peter Exp $
+ * $Id: vfs_bio.c,v 1.165 1998/07/04 20:45:31 julian Exp $
*/
/*
@@ -1458,7 +1458,8 @@ loop1:
bp->b_flags |= B_NOCACHE;
VOP_BWRITE(bp);
} else {
- if (bp->b_flags & B_VMIO) {
+ if ((bp->b_flags & B_VMIO) &&
+ (LIST_FIRST(&bp->b_dep) == NULL)) {
bp->b_flags |= B_RELBUF;
brelse(bp);
} else {
@@ -1571,7 +1572,7 @@ geteblk(int size)
while ((bp = getnewbuf(0, (daddr_t) 0, 0, 0, size, MAXBSIZE)) == 0);
splx(s);
allocbuf(bp, size);
- bp->b_flags |= B_INVAL;
+ bp->b_flags |= B_INVAL; /* b_dep cleared by getnewbuf() */
return (bp);
}
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c
index a2e4fd412cfb..b4d50e7b81f3 100644
--- a/sys/ufs/ufs/ufs_readwrite.c
+++ b/sys/ufs/ufs/ufs_readwrite.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ufs_readwrite.c 8.11 (Berkeley) 5/8/95
- * $Id: ufs_readwrite.c,v 1.49 1998/04/06 18:18:50 peter Exp $
+ * $Id: ufs_readwrite.c,v 1.50 1998/06/04 17:04:44 dfr Exp $
*/
#define BLKSIZE(a, b, c) blksize(a, b, c)
@@ -210,7 +210,8 @@ READ(ap)
if (error)
break;
- if (ioflag & IO_VMIO) {
+ if ((ioflag & IO_VMIO) &&
+ (LIST_FIRST(&bp->b_dep) == NULL)) {
bp->b_flags |= B_RELBUF;
brelse(bp);
} else {
@@ -219,7 +220,8 @@ READ(ap)
}
if (bp != NULL) {
- if (ioflag & IO_VMIO) {
+ if ((ioflag & IO_VMIO) &&
+ (LIST_FIRST(&bp->b_dep) == NULL)) {
bp->b_flags |= B_RELBUF;
brelse(bp);
} else {
@@ -355,7 +357,8 @@ WRITE(ap)
error =
uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
- if (ioflag & IO_VMIO)
+ if ((ioflag & IO_VMIO) &&
+ (LIST_FIRST(&bp->b_dep) == NULL))
bp->b_flags |= B_RELBUF;
if (ioflag & IO_SYNC) {