summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2011-04-07 19:07:42 +0000
committerbeck <beck@openbsd.org>2011-04-07 19:07:42 +0000
commit37e8a80a94d6c5f2c4681e47285f444de2d150d8 (patch)
treeef151b5189a512ef156c3f809ecc06dc9ecace70 /sys/kern/vfs_bio.c
parentMake $syscall_return work for real. (diff)
downloadwireguard-openbsd-37e8a80a94d6c5f2c4681e47285f444de2d150d8.tar.xz
wireguard-openbsd-37e8a80a94d6c5f2c4681e47285f444de2d150d8.zip
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;
}