summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs/tmpfs_vfsops.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-07-24 17:14:53 +0000
committerdelphij <delphij@FreeBSD.org>2007-07-24 17:14:53 +0000
commit41fd4384d16bc3f5bf41a3d5c98416c5d9d12d9e (patch)
treebf03f54caf80514d0b0bb37dbf56ea4759dca121 /sys/fs/tmpfs/tmpfs_vfsops.c
parent5ae74699042712e2f924ee6a9aaa1b90b453e6d0 (diff)
downloadFreeBSD-src-41fd4384d16bc3f5bf41a3d5c98416c5d9d12d9e.zip
FreeBSD-src-41fd4384d16bc3f5bf41a3d5c98416c5d9d12d9e.tar.gz
MFp4: Force 64-bit arithmatic when caculating the maximum file size.
This fixes tmpfs caculations on 32-bit systems equipped with more than 4GB swap. Reported by: Craig Boston <craig xfoil gank org> PR: kern/114870 Approved by: re (tmpfs blanket)
Diffstat (limited to 'sys/fs/tmpfs/tmpfs_vfsops.c')
-rw-r--r--sys/fs/tmpfs/tmpfs_vfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c
index 69822b1..e860e16 100644
--- a/sys/fs/tmpfs/tmpfs_vfsops.c
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c
@@ -268,7 +268,7 @@ tmpfs_mount(struct mount *mp, struct thread *td)
mtx_init(&tmp->allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF);
tmp->tm_nodes_max = nodes;
tmp->tm_nodes_inuse = 0;
- tmp->tm_maxfilesize = (cnt.v_page_count + get_swpgtotal()) * PAGE_SIZE;
+ tmp->tm_maxfilesize = (u_int64_t)(cnt.v_page_count + get_swpgtotal()) * PAGE_SIZE;
LIST_INIT(&tmp->tm_nodes_used);
tmp->tm_pages_max = pages;
OpenPOWER on IntegriCloud