summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2011-04-07 19:07:43 +0000
committerBob Beck <beck@cvs.openbsd.org>2011-04-07 19:07:43 +0000
commit702d794d38b4104672f33c0778d343444c8db8ca (patch)
treeb9704f30228c931723da122783009f54f0f5860b /sys/kern/vfs_bio.c
parent6029e115e4cc8da106ff817817175ea0fc0320a8 (diff)
Revert previous diff decrementing bcstats.numbufpages here. This function
does not do what it purports to do, it shrinks mapping, not allocation, as the pages have already been given away to other buffers. This also renames the function to make this a little more obvious and art should not name funcitons ok thib@, art@
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index c48624f9b3a..045577708c5 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_bio.c,v 1.128 2011/04/02 16:47:17 beck Exp $ */
+/* $OpenBSD: vfs_bio.c,v 1.129 2011/04/07 19:07:42 beck Exp $ */
/* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */
/*
@@ -463,9 +463,10 @@ bread_cluster_callback(struct buf *bp)
size_t newsize = xbpp[1]->b_bufsize;
/*
- * Shrink this buffer to only cover its part of the total I/O.
+ * Shrink this buffer's mapping to only cover its part of
+ * the total I/O.
*/
- buf_shrink_mem(bp, newsize);
+ buf_fix_mapping(bp, newsize);
bp->b_bcount = newsize;
}