summaryrefslogtreecommitdiff
path: root/tmpfs/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmpfs/node.c')
-rw-r--r--tmpfs/node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tmpfs/node.c b/tmpfs/node.c
index ccc077ca..9d3647f8 100644
--- a/tmpfs/node.c
+++ b/tmpfs/node.c
@@ -443,7 +443,8 @@ diskfs_grow (struct node *np, off_t size, struct protid *cred)
return 0;
size = round_page (size);
- if (round_page (tmpfs_space_used + size) / vm_page_size > tmpfs_page_limit)
+ if (round_page (tmpfs_space_used + size - np->allocsize)
+ / vm_page_size > tmpfs_page_limit)
return ENOSPC;
if (default_pager == MACH_PORT_NULL)