summaryrefslogtreecommitdiff
path: root/ufs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-09-27 19:24:51 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-09-27 19:24:51 +0000
commit1c052b1a67950b466ea1e82144f6b900f309eb0e (patch)
treef54a7e32158703cc4217c20f3803fa3469989d35 /ufs
parent8bd45f0f1728824237681e04b043ff7cc5e588fe (diff)
Formerly sizes.c.~22~
Diffstat (limited to 'ufs')
-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;
}