Skip to content

Commit

Permalink
GFS2: Replace assertion with proper error handling
Browse files Browse the repository at this point in the history
One fewer assert, one more place we can recover gracefully
if there is an error.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
swhiteho committed Aug 17, 2009
1 parent 6050b9c commit 05164e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,7 +1561,9 @@ int gfs2_alloc_di(struct gfs2_inode *dip, u64 *bn, u64 *generation)

rgd->rd_last_alloc = blk;
block = rgd->rd_data0 + blk;
gfs2_assert_withdraw(sdp, rgd->rd_free);
if (rgd->rd_free == 0)
goto rgrp_error;

rgd->rd_free--;
rgd->rd_dinodes++;
*generation = rgd->rd_igeneration++;
Expand Down

0 comments on commit 05164e5

Please sign in to comment.