diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-09-21 19:26:23 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-09-21 19:26:23 +0000 |
commit | fbd393ca60faf7188e22c7f502f676a04abca408 (patch) | |
tree | d834688a600520b48a36fc26d378bae50d3375ac /ufs | |
parent | 3a3142066eba566c020c0b01da7e5eaddf9130ba (diff) |
Formerly sizes.c.~17~
Diffstat (limited to 'ufs')
-rw-r--r-- | ufs/sizes.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ufs/sizes.c b/ufs/sizes.c index c34474f5..bde73dee 100644 --- a/ufs/sizes.c +++ b/ufs/sizes.c @@ -129,6 +129,7 @@ diskfs_truncate (struct node *np, for (idx = first2free; idx <= olastblock; idx ++) { + assert (idx - NDADDR < np->dn->sinloclen); if (np->dn->sinloc[idx - NDADDR]) { ffs_blkfree (np, np->dn->sinloc[idx - NDADDR], sblock->fs_bsize); @@ -247,6 +248,7 @@ sindir_drop (struct node *np, din_map (np); for (idx = first; idx = last; idx++) { + assert (idx - 1 < np->dn->dinloclen); if (np->dn->dinloc[idx - 1]) { ffs_blkfree (np, np->dn->dinloc[idx - 1], sblock->fs_bsize); @@ -449,6 +451,7 @@ diskfs_grow (struct node *np, } lbn -= NDADDR; + assert (lbn < np->dn->sinloclen); if (!np->dn->sinloc[lbn]) { err = ffs_alloc (np, lbn, ffs_blkpref (np, lbn + NDADDR, lbn, @@ -501,8 +504,10 @@ diskfs_grow (struct node *np, round_page (poke_off2 + poke_len2)); mach_port_deallocate (mach_task_self (), obj); } - + +#if 0 diskfs_file_update (np, 0); +#endif return err; } |