From: Eric Sesterhenn / snakebyte Date: Fri, 27 Jan 2006 09:32:52 +0000 (+0100) Subject: [PATCH] BUG_ON() Conversion in fs/ocfs2/ X-Git-Tag: v2.6.16-rc3~209^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebdec83ba46c123fe3bfdcaacf62d0dfe8fe4187;p=pandora-kernel.git [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 Signed-off-by: Mark Fasheh --- 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) Reading git-diff-tree failed