Commit 05164e5b authored by Steven Whitehouse's avatar Steven Whitehouse

GFS2: Replace assertion with proper error handling

One fewer assert, one more place we can recover gracefully
if there is an error.
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 6050b9c7
...@@ -1561,7 +1561,9 @@ int gfs2_alloc_di(struct gfs2_inode *dip, u64 *bn, u64 *generation) ...@@ -1561,7 +1561,9 @@ int gfs2_alloc_di(struct gfs2_inode *dip, u64 *bn, u64 *generation)
rgd->rd_last_alloc = blk; rgd->rd_last_alloc = blk;
block = rgd->rd_data0 + 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_free--;
rgd->rd_dinodes++; rgd->rd_dinodes++;
*generation = rgd->rd_igeneration++; *generation = rgd->rd_igeneration++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment