summaryrefslogtreecommitdiff
path: root/sys/ufs/ext2fs/ext2fs_inode.c
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2007-05-26 20:26:52 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2007-05-26 20:26:52 +0000
commit196f5066228d908cbac060396a1aba557efe1ef3 (patch)
tree5c48aa4f82af6d902afe35afb642c3d4225a1a07 /sys/ufs/ext2fs/ext2fs_inode.c
parent6e18a0b85a66c596fb041fbf27229487f6661bbf (diff)
Dynamic buffer cache. Initial diff from mickey@, okay art@ beck@ toby@
deraadt@ dlg@.
Diffstat (limited to 'sys/ufs/ext2fs/ext2fs_inode.c')
-rw-r--r--sys/ufs/ext2fs/ext2fs_inode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/ufs/ext2fs/ext2fs_inode.c b/sys/ufs/ext2fs/ext2fs_inode.c
index 7a1240593e3..a7bb5073f3f 100644
--- a/sys/ufs/ext2fs/ext2fs_inode.c
+++ b/sys/ufs/ext2fs/ext2fs_inode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_inode.c,v 1.34 2007/04/11 16:08:50 thib Exp $ */
+/* $OpenBSD: ext2fs_inode.c,v 1.35 2007/05/26 20:26:51 pedro Exp $ */
/* $NetBSD: ext2fs_inode.c,v 1.24 2001/06/19 12:59:18 wiz Exp $ */
/*
@@ -315,8 +315,8 @@ ext2fs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred)
size = fs->e2fs_bsize;
uvm_vnp_setsize(ovp, length);
uvm_vnp_uncache(ovp);
- bzero((char *)bp->b_data + offset, (u_int)(size - offset));
- allocbuf(bp, size);
+ bzero(bp->b_data + offset, (u_int)(size - offset));
+ bp->b_bcount = size;
if (aflags & B_SYNC)
bwrite(bp);
else