+ return (bp->b_lblkno == S_INDIR || bp->b_lblkno < -NIADDR);
+}
+
+/* Get the next inode/summary block. */
+static daddr_t
+next(fs, sp, nbp)
+ LFS *fs;
+ SEGMENT *sp;
+ int *nbp;
+{
+ int nblocks, nino_blocks, nseg_blocks, sums_per_block;
+
+ /* Fs blocks allocated to summary blocks. */
+ sums_per_block = fs->lfs_bsize / LFS_SUMMARY_SIZE;
+ nseg_blocks = (sp->nsums + sums_per_block - 1) / sums_per_block;
+
+ /* Fs blocks allocated to inodes. */
+ nino_blocks = (sp->ninodes + INOPB(fs) - 1) / INOPB(fs);
+
+ /* Total number of fs blocks allocated. */
+ nblocks = nseg_blocks + nino_blocks;
+
+ if (nbp)
+ *nbp = nblocks;
+
+ /*
+ * The disk address of the new inode/summary block is the address of
+ * the start of the segment after this one minus the number of blocks
+ * that we've already used.
+ */
+ return (sntoda(fs, sp->seg_number + 1) - fsbtodb(fs, nblocks + 1));