Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / fs / ubifs / lprops.c
index ea9d491..b33ec7a 100644 (file)
@@ -453,7 +453,7 @@ static void change_category(struct ubifs_info *c, struct ubifs_lprops *lprops)
        int new_cat = ubifs_categorize_lprops(c, lprops);
 
        if (old_cat == new_cat) {
-               struct ubifs_lpt_heap *heap = &c->lpt_heap[new_cat - 1];
+               struct ubifs_lpt_heap *heap;
 
                /* lprops on a heap now must be moved up or down */
                if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT)
@@ -852,7 +852,9 @@ const struct ubifs_lprops *ubifs_fast_find_frdi_idx(struct ubifs_info *c)
        return lprops;
 }
 
-#ifdef CONFIG_UBIFS_FS_DEBUG
+/*
+ * Everything below is related to debugging.
+ */
 
 /**
  * dbg_check_cats - check category heaps and lists.
@@ -1007,8 +1009,8 @@ void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
 out:
        if (err) {
                dbg_msg("failed cat %d hpos %d err %d", cat, i, err);
-               dbg_dump_stack();
-               dbg_dump_heap(c, heap, cat);
+               dump_stack();
+               ubifs_dump_heap(c, heap, cat);
        }
 }
 
@@ -1115,8 +1117,8 @@ static int scan_check_cb(struct ubifs_info *c,
        if (IS_ERR(sleb)) {
                ret = PTR_ERR(sleb);
                if (ret == -EUCLEAN) {
-                       dbg_dump_lprops(c);
-                       dbg_dump_budg(c, &c->bi);
+                       ubifs_dump_lprops(c);
+                       ubifs_dump_budg(c, &c->bi);
                }
                goto out;
        }
@@ -1243,7 +1245,7 @@ out_print:
        ubifs_err("bad accounting of LEB %d: free %d, dirty %d flags %#x, "
                  "should be free %d, dirty %d",
                  lnum, lp->free, lp->dirty, lp->flags, free, dirty);
-       dbg_dump_leb(c, lnum);
+       ubifs_dump_leb(c, lnum);
 out_destroy:
        ubifs_scan_destroy(sleb);
        ret = -EINVAL;
@@ -1321,5 +1323,3 @@ int dbg_check_lprops(struct ubifs_info *c)
 out:
        return err;
 }
-
-#endif /* CONFIG_UBIFS_FS_DEBUG */