From patchwork Mon May 16 07:44:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [14/20] UBIFS: remove BUG statement Date: Sun, 15 May 2011 21:44:33 -0000 From: Artem Bityutskiy X-Patchwork-Id: 95687 Message-Id: <1305531879-19311-15-git-send-email-dedekind1@gmail.com> To: MTD list Cc: Adrian Hunter From: Artem Bityutskiy Remove a 'BUG()' statement when we are unable to find a bud and add a similar 'ubifs_assert()' statement instead. Signed-off-by: Artem Bityutskiy --- fs/ubifs/replay.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/fs/ubifs/replay.c b/fs/ubifs/replay.c index 4378baa..0f50fbf 100644 --- a/fs/ubifs/replay.c +++ b/fs/ubifs/replay.c @@ -487,7 +487,6 @@ static int replay_bud(struct ubifs_info *c, struct bud_entry *b) int jhead = b->bud->jhead; struct ubifs_scan_leb *sleb; struct ubifs_scan_node *snod; - struct ubifs_bud *bud; dbg_mnt("replay bud LEB %d, head %d, offs %d", lnum, jhead, offs); @@ -608,10 +607,7 @@ static int replay_bud(struct ubifs_info *c, struct bud_entry *b) goto out; } - bud = ubifs_search_bud(c, lnum); - if (!bud) - BUG(); - + ubifs_assert(ubifs_search_bud(c, lnum)); ubifs_assert(sleb->endpt - offs >= used); ubifs_assert(sleb->endpt % c->min_io_size == 0);