summaryrefslogtreecommitdiff
path: root/ufs/alloc.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-09-23 01:29:06 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-09-23 01:29:06 +0000
commitfe535a7b1fb96b0476e3f6374fe026db64ba8ecd (patch)
tree3df9f35fb1d79d70b93cd39c489982482a18007d /ufs/alloc.c
parent20a06f99166d344e2e7f38e4cbcb0d11c5d538c1 (diff)
Formerly alloc.c.~15~
Diffstat (limited to 'ufs/alloc.c')
-rw-r--r--ufs/alloc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ufs/alloc.c b/ufs/alloc.c
index 19389afe..2d27c1e7 100644
--- a/ufs/alloc.c
+++ b/ufs/alloc.c
@@ -200,7 +200,7 @@ ffs_realloccg(register struct node *np,
goto nospace;
if (error = diskfs_catch_exception ())
return error;
- bprev = dinodes[np->dn->number].di_db[lbprev];
+ bprev = (dino (np->dn->number))->di_db[lbprev];
diskfs_end_catch_exception ();
assert ("old block not allocated" && bprev);
@@ -787,7 +787,7 @@ ffs_fragextend(struct node *np,
}
cgp = (struct cg *)bp->b_data;
#else
- cgp = (struct cg *) (cgs + sblock->fs_bsize * cg);
+ cgp = cg_locate (cg);
#endif
if (!cg_chkmagic(cgp)) {
/* brelse(bp); */
@@ -852,7 +852,7 @@ ffs_alloccg(struct node *np,
}
cgp = (struct cg *)bp->b_data;
#else
- cgp = (struct cg *) (cgs + sblock->fs_bsize * cg);
+ cgp = cg_locate (cg);
#endif
if (!cg_chkmagic(cgp) ||
(cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) {
@@ -1146,7 +1146,7 @@ ffs_nodealloccg(struct node *np,
}
cgp = (struct cg *)bp->b_data;
#else
- cgp = (struct cg *)(cgs + sblock->fs_bsize * cg);
+ cgp = cg_locate (cg);
#endif
if (!cg_chkmagic(cgp) || cgp->cg_cs.cs_nifree == 0) {
/* brelse(bp); */
@@ -1227,7 +1227,7 @@ ffs_blkfree(register struct node *np,
}
cgp = (struct cg *)bp->b_data;
#else
- cgp = (struct cg *)(cgs + sblock->fs_bsize * cg);
+ cgp = cg_locate (cg);
#endif
if (!cg_chkmagic(cgp)) {
/* brelse(bp); */
@@ -1317,7 +1317,7 @@ diskfs_free_node (struct node *np, mode_t mode)
}
cgp = (struct cg *)bp->b_data;
#else
- cgp = (struct cg *)(cgs + sblock->fs_bsize * cg);
+ cgp = cg_locate (cg);
#endif
if (!cg_chkmagic(cgp)) {
/* brelse(bp); */