summaryrefslogtreecommitdiff
path: root/ufs/sizes.c
diff options
context:
space:
mode:
Diffstat (limited to 'ufs/sizes.c')
-rw-r--r--ufs/sizes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ufs/sizes.c b/ufs/sizes.c
index 11efc2b8..0f0fd427 100644
--- a/ufs/sizes.c
+++ b/ufs/sizes.c
@@ -481,9 +481,9 @@ diskfs_grow (struct node *np,
{
int newallocsize;
if (lbn < NDADDR)
- newallocsize = (lbn - 1) * sblock->fs_bsize + size;
+ newallocsize = lbn * sblock->fs_bsize + size;
else
- newallocsize = lbn * sblock->fs_bsize;
+ newallocsize = (lbn + 1) * sblock->fs_bsize;
assert (newallocsize > np->allocsize);
np->allocsize = newallocsize;
}