summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/ufs/ufs/ufs_readwrite.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_readwrite.c b/sys/ufs/ufs/ufs_readwrite.c
index 4cecf167d60..4d64776094b 100644
--- a/sys/ufs/ufs/ufs_readwrite.c
+++ b/sys/ufs/ufs/ufs_readwrite.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_readwrite.c,v 1.13 1998/03/01 08:07:13 niklas Exp $ */
+/* $OpenBSD: ufs_readwrite.c,v 1.14 1998/08/17 19:30:30 csapuntz Exp $ */
/* $NetBSD: ufs_readwrite.c,v 1.9 1996/05/11 18:27:57 mycroft Exp $ */
/*-
@@ -261,7 +261,11 @@ WRITE(v)
xfersize = size;
error =
- uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
+ uiomove((char *)bp->b_data + blkoffset, xfersize, uio);
+
+ if (error != 0)
+ bzero((char *)bp->b_data + blkoffset, xfersize);
+
#ifdef LFS_READWRITE
(void)VOP_BWRITE(bp);
#else