summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-10-11 06:33:12 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1998-10-11 06:33:12 +0000
commit93d540e508c8bc51fd4c190bf7b4a589bed788ac (patch)
treef2c9c498813ec0cadb6e0665e32882c5ce055907 /sys/kern/vfs_cluster.c
parentf8aa79943a887e911914bb9e63514271d7dd4790 (diff)
Fix from Kirk McKusick to make sure that clustering works correctly across
the 2GB file boundary.
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 6ed498fc751..6bba33ac324 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_cluster.c,v 1.13 1998/02/20 14:51:58 niklas Exp $ */
+/* $OpenBSD: vfs_cluster.c,v 1.14 1998/10/11 06:33:11 csapuntz Exp $ */
/* $NetBSD: vfs_cluster.c,v 1.12 1996/04/22 01:39:05 christos Exp $ */
/*-
@@ -511,7 +511,7 @@ cluster_write(bp, filesize)
* Otherwise try reallocating to make it sequential.
*/
cursize = vp->v_lastw - vp->v_cstart + 1;
- if ((lbn + 1) * bp->b_bcount != filesize ||
+ if (((u_quad_t)(lbn + 1)) * bp->b_bcount != filesize ||
lbn != vp->v_lastw + 1 || vp->v_clen <= cursize) {
cluster_wbuild(vp, NULL, bp->b_bcount,
vp->v_cstart, cursize, lbn);