summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/rgrp.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2009-08-17 11:06:43 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2009-08-17 11:06:43 +0100
commit05164e5b37a8329bfbcf72f526302cb2dd885fbd (patch)
tree069af9ca385f0c7d9cb273d0c3b70c6c3b2043f3 /fs/gfs2/rgrp.c
parent6050b9c74f24513191fc6b5e4b3583e38d146bf5 (diff)
downloadlinux-05164e5b37a8329bfbcf72f526302cb2dd885fbd.tar.bz2
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: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r--fs/gfs2/rgrp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 3d0193af19c3..c681c54fbd60 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -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++;