projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6050b9c
)
GFS2: Replace assertion with proper error handling
author
Steven Whitehouse
<swhiteho@redhat.com>
Mon, 17 Aug 2009 10:06:43 +0000
(11:06 +0100)
committer
Steven Whitehouse
<swhiteho@redhat.com>
Mon, 17 Aug 2009 10:06:43 +0000
(11:06 +0100)
One fewer assert, one more place we can recover gracefully
if there is an error.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/rgrp.c
patch
|
blob
|
history
diff --git
a/fs/gfs2/rgrp.c
b/fs/gfs2/rgrp.c
index 3d0193af19c3c43f9cf7f8c39b6ef7fe9402c5dc..c681c54fbd6014d4f414935d0af9428935c4e5c0 100644
(file)
--- 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++;