From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] GFS2: Replace assertion with proper error handling
Date: Tue, 11 Aug 2009 10:37:12 +0100 [thread overview]
Message-ID: <1249983432.3337.4.camel@localhost.localdomain> (raw)
From e2d98c7f0f30b3f4fb1b8de73edfe60b3dab4ac4 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
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 <swhiteho@redhat.com>
---
fs/gfs2/rgrp.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 3d0193a..77b99b7 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++;
--
1.6.2.5
reply other threads:[~2009-08-11 9:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1249983432.3337.4.camel@localhost.localdomain \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).