1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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)
This commit is contained in:
Xin LI 2007-07-24 17:14:53 +00:00
parent 05a4c1c1ef
commit f62e5595fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171570

View File

@ -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;