summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-06-20 08:26:38 +0000
committerphk <phk@FreeBSD.org>2003-06-20 08:26:38 +0000
commita5e8f5f0940389424da141c9f14d49be28815eef (patch)
tree9251dc5681c5f2997ac2c5fd2e9695ad2c4098b4 /sys/kern/vfs_bio.c
parent6689b404af0ff9a980306eadf2ce472509df3ee2 (diff)
downloadFreeBSD-src-a5e8f5f0940389424da141c9f14d49be28815eef.zip
FreeBSD-src-a5e8f5f0940389424da141c9f14d49be28815eef.tar.gz
Initialize b_saveaddr when we hand out buffers
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index ffcbc97..f6e8787 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2017,7 +2017,8 @@ restart:
atomic_add_int(&bufreusecnt, 1);
}
}
- bp->b_data = bp->b_kvabase;
+ bp->b_saveaddr = bp->b_kvabase;
+ bp->b_data = bp->b_saveaddr;
}
return(bp);
}
@@ -2695,7 +2696,8 @@ allocbuf(struct buf *bp, int size)
bufspacewakeup();
bp->b_bufsize = 0;
}
- bp->b_data = bp->b_kvabase;
+ bp->b_saveaddr = bp->b_kvabase;
+ bp->b_data = bp->b_saveaddr;
bp->b_bcount = 0;
bp->b_flags &= ~B_MALLOC;
}
OpenPOWER on IntegriCloud