ocfs2 endianness fixes
[deliverable/linux.git] / fs / ocfs2 / alloc.c
index a26882144e8fa577624a404f41a2dc4269194812..10bfb466e0687eb4c99dd3c5fc1e787c07d68efc 100644 (file)
@@ -1029,8 +1029,7 @@ static void ocfs2_rotate_leaf(struct ocfs2_extent_list *el,
        BUG_ON(!next_free);
 
        /* The tree code before us didn't allow enough room in the leaf. */
-       if (el->l_next_free_rec == el->l_count && !has_empty)
-               BUG();
+       BUG_ON(el->l_next_free_rec == el->l_count && !has_empty);
 
        /*
         * The easiest way to approach this is to just remove the
@@ -2789,7 +2788,7 @@ static int ocfs2_merge_rec_right(struct inode *inode,
        BUG_ON(index >= le16_to_cpu(el->l_next_free_rec));
        left_rec = &el->l_recs[index];
 
-       if (index == le16_to_cpu(el->l_next_free_rec - 1) &&
+       if (index == le16_to_cpu(el->l_next_free_rec) - 1 &&
            le16_to_cpu(el->l_next_free_rec) == le16_to_cpu(el->l_count)) {
                /* we meet with a cross extent block merge. */
                ret = ocfs2_get_right_path(inode, left_path, &right_path);
@@ -2803,7 +2802,7 @@ static int ocfs2_merge_rec_right(struct inode *inode,
                BUG_ON(next_free <= 0);
                right_rec = &right_el->l_recs[0];
                if (ocfs2_is_empty_extent(right_rec)) {
-                       BUG_ON(le16_to_cpu(next_free) <= 1);
+                       BUG_ON(next_free <= 1);
                        right_rec = &right_el->l_recs[1];
                }
 
This page took 0.027409 seconds and 5 git commands to generate.