diff options
author | Eric Sesterhenn / snakebyte <snakebyte@gmx.de> | 2006-01-27 04:32:52 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-02-03 16:54:22 -0500 |
commit | ebdec83ba46c123fe3bfdcaacf62d0dfe8fe4187 (patch) | |
tree | acd18f3170c1de8295375cadb0a33fa23066524e /fs/ocfs2/journal.c | |
parent | b4c7f538508adcde7a0a5162faec0b2ab19b90bd (diff) |
[PATCH] BUG_ON() Conversion in fs/ocfs2/
this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r-- | fs/ocfs2/journal.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index ccabed9a0aad..b71b3385fdbd 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -147,8 +147,7 @@ struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, | |||
147 | 147 | ||
148 | mlog_entry("(max_buffs = %d)\n", max_buffs); | 148 | mlog_entry("(max_buffs = %d)\n", max_buffs); |
149 | 149 | ||
150 | if (!osb || !osb->journal->j_journal) | 150 | BUG_ON(!osb || !osb->journal->j_journal); |
151 | BUG(); | ||
152 | 151 | ||
153 | if (ocfs2_is_hard_readonly(osb)) { | 152 | if (ocfs2_is_hard_readonly(osb)) { |
154 | ret = -EROFS; | 153 | ret = -EROFS; |
@@ -672,8 +671,7 @@ void ocfs2_journal_shutdown(struct ocfs2_super *osb) | |||
672 | 671 | ||
673 | mlog_entry_void(); | 672 | mlog_entry_void(); |
674 | 673 | ||
675 | if (!osb) | 674 | BUG_ON(!osb); |
676 | BUG(); | ||
677 | 675 | ||
678 | journal = osb->journal; | 676 | journal = osb->journal; |
679 | if (!journal) | 677 | if (!journal) |
@@ -805,8 +803,7 @@ int ocfs2_journal_wipe(struct ocfs2_journal *journal, int full) | |||
805 | 803 | ||
806 | mlog_entry_void(); | 804 | mlog_entry_void(); |
807 | 805 | ||
808 | if (!journal) | 806 | BUG_ON(!journal); |
809 | BUG(); | ||
810 | 807 | ||
811 | status = journal_wipe(journal->j_journal, full); | 808 | status = journal_wipe(journal->j_journal, full); |
812 | if (status < 0) { | 809 | if (status < 0) { |
@@ -1271,8 +1268,7 @@ static int ocfs2_recover_node(struct ocfs2_super *osb, | |||
1271 | 1268 | ||
1272 | /* Should not ever be called to recover ourselves -- in that | 1269 | /* Should not ever be called to recover ourselves -- in that |
1273 | * case we should've called ocfs2_journal_load instead. */ | 1270 | * case we should've called ocfs2_journal_load instead. */ |
1274 | if (osb->node_num == node_num) | 1271 | BUG_ON(osb->node_num == node_num); |
1275 | BUG(); | ||
1276 | 1272 | ||
1277 | slot_num = ocfs2_node_num_to_slot(si, node_num); | 1273 | slot_num = ocfs2_node_num_to_slot(si, node_num); |
1278 | if (slot_num == OCFS2_INVALID_SLOT) { | 1274 | if (slot_num == OCFS2_INVALID_SLOT) { |