break;
goal = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
GFS2_BLKST_UNLINKED);
- if (goal == 0)
+ if (goal == BFITNOENT)
break;
no_addr = goal + rgd->rd_data0;
goal++;
bi->bi_len, blk, new_state);
}
- return (blk == BFITNOENT) ? 0 : (bi->bi_start * GFS2_NBBY) + blk;
+ return (blk == BFITNOENT) ? blk : (bi->bi_start * GFS2_NBBY) + blk;
}
/**
goal = rgd->rd_last_alloc_data;
blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
+ BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_data = blk;
block = rgd->rd_data0 + blk;
goal = rgd->rd_last_alloc_meta;
blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED);
+ BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_meta = blk;
block = rgd->rd_data0 + blk;
blk = rgblk_search(rgd, rgd->rd_last_alloc_meta,
GFS2_BLKST_FREE, GFS2_BLKST_DINODE);
+ BUG_ON(blk == BFITNOENT);
rgd->rd_last_alloc_meta = blk;