GFS2: Replace assertion with proper error handling
From e2d98c7f0f30b3f4fb1b8de73edfe60b3dab4ac4 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <[email protected]>
Date: Tue, 11 Aug 2009 11:19:06 +0100
Subject: [PATCH 4/5] 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 <[email protected]>
--- fs/gfs2/rgrp.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
fs/gfs2/rgrp.c +3 -1
@@ -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++;
Signature · 1 line
1.6.2.5