[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>
This commit is contained in:

committed by
Mark Fasheh

parent
b4c7f53850
commit
ebdec83ba4
@@ -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)
|
||||
|
Reference in New Issue
Block a user