diff options
author | delphij <delphij@FreeBSD.org> | 2007-07-23 06:54:58 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-07-23 06:54:58 +0000 |
commit | 0321a712a7aaec868b171c9f932107ba022656af (patch) | |
tree | cbbb954aab33a709541a9d4652d4565805f16fec /sys/fs/tmpfs | |
parent | 43113ba612d54e668f24450f87fc04210861fb3f (diff) | |
download | FreeBSD-src-0321a712a7aaec868b171c9f932107ba022656af.zip FreeBSD-src-0321a712a7aaec868b171c9f932107ba022656af.tar.gz |
MFp4: When swapping is not enabled, allow creating files by taking
physical memory pages into account for tm_maxfilesize.
Reported by: Dominique Goncalves <dominique.goncalves gmail.com>
Submitted by: Howard Su
Approved by: re (tmpfs blanket)
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vfsops.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |