From 0321a712a7aaec868b171c9f932107ba022656af Mon Sep 17 00:00:00 2001 From: delphij Date: Mon, 23 Jul 2007 06:54:58 +0000 Subject: MFp4: When swapping is not enabled, allow creating files by taking physical memory pages into account for tm_maxfilesize. Reported by: Dominique Goncalves Submitted by: Howard Su Approved by: re (tmpfs blanket) --- sys/fs/tmpfs/tmpfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/fs/tmpfs') diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 993d3f9..69822b1 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 = get_swpgtotal() * PAGE_SIZE; + tmp->tm_maxfilesize = (cnt.v_page_count + get_swpgtotal()) * PAGE_SIZE; LIST_INIT(&tmp->tm_nodes_used); tmp->tm_pages_max = pages; -- cgit v1.1