Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64025
b: refs/heads/master
c: 6eefaf6
h: refs/heads/master
i:
  64023: ed2c810
v: v3
  • Loading branch information
Steven Whitehouse committed Aug 14, 2007
1 parent 775f73c commit b88befc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24c7387333c77b602ece7ecd6a85fc94f8f16d8c
refs/heads/master: 6eefaf61f664053c1dd6534a994cab3f8bb07263
7 changes: 5 additions & 2 deletions trunk/fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ static struct inode *try_rgrp_unlink(struct gfs2_rgrpd *rgd, u64 *last_unlinked)
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++;
Expand Down Expand Up @@ -1316,7 +1316,7 @@ static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 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;
}

/**
Expand Down Expand Up @@ -1396,6 +1396,7 @@ u64 gfs2_alloc_data(struct gfs2_inode *ip)
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;
Expand Down Expand Up @@ -1440,6 +1441,7 @@ u64 gfs2_alloc_meta(struct gfs2_inode *ip)
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;
Expand Down Expand Up @@ -1481,6 +1483,7 @@ u64 gfs2_alloc_di(struct gfs2_inode *dip, u64 *generation)

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;

Expand Down

0 comments on commit b88befc

Please sign in to comment.