summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/extent_map.c
diff options
context:
space:
mode:
authorEric Sesterhenn / snakebyte <snakebyte@gmx.de>2006-01-27 10:32:52 +0100
committerMark Fasheh <mark.fasheh@oracle.com>2006-02-03 13:54:22 -0800
commitebdec83ba46c123fe3bfdcaacf62d0dfe8fe4187 (patch)
treeacd18f3170c1de8295375cadb0a33fa23066524e /fs/ocfs2/extent_map.c
parentb4c7f538508adcde7a0a5162faec0b2ab19b90bd (diff)
downloadlinux-ebdec83ba46c123fe3bfdcaacf62d0dfe8fe4187.tar.gz
linux-ebdec83ba46c123fe3bfdcaacf62d0dfe8fe4187.tar.bz2
linux-ebdec83ba46c123fe3bfdcaacf62d0dfe8fe4187.zip
[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/extent_map.c')
-rw-r--r--fs/ocfs2/extent_map.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index eb2bd8a4ca82..b6ba292e9544 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -262,8 +262,7 @@ static int ocfs2_extent_map_find_leaf(struct inode *inode,
el = &eb->h_list;
}
- if (el->l_tree_depth)
- BUG();
+ BUG_ON(el->l_tree_depth);
for (i = 0; i < le16_to_cpu(el->l_next_free_rec); i++) {
rec = &el->l_recs[i];
@@ -364,8 +363,8 @@ static int ocfs2_extent_map_lookup_read(struct inode *inode,
return ret;
}
- if (ent->e_tree_depth)
- BUG(); /* FIXME: Make sure this isn't a corruption */
+ /* FIXME: Make sure this isn't a corruption */
+ BUG_ON(ent->e_tree_depth);
*ret_ent = ent;
@@ -423,8 +422,7 @@ static int ocfs2_extent_map_try_insert(struct inode *inode,
le32_to_cpu(rec->e_clusters), NULL,
NULL);
- if (!old_ent)
- BUG();
+ BUG_ON(!old_ent);
ret = -EEXIST;
if (old_ent->e_tree_depth < tree_depth)