aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/lprops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/lprops.c')
-rw-r--r--fs/ubifs/lprops.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index f8a181e647c..86eb8e53324 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -447,7 +447,7 @@ static void change_category(struct ubifs_info *c, struct ubifs_lprops *lprops)
447 int new_cat = ubifs_categorize_lprops(c, lprops); 447 int new_cat = ubifs_categorize_lprops(c, lprops);
448 448
449 if (old_cat == new_cat) { 449 if (old_cat == new_cat) {
450 struct ubifs_lpt_heap *heap = &c->lpt_heap[new_cat - 1]; 450 struct ubifs_lpt_heap *heap;
451 451
452 /* lprops on a heap now must be moved up or down */ 452 /* lprops on a heap now must be moved up or down */
453 if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT) 453 if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT)
@@ -846,7 +846,9 @@ const struct ubifs_lprops *ubifs_fast_find_frdi_idx(struct ubifs_info *c)
846 return lprops; 846 return lprops;
847} 847}
848 848
849#ifdef CONFIG_UBIFS_FS_DEBUG 849/*
850 * Everything below is related to debugging.
851 */
850 852
851/** 853/**
852 * dbg_check_cats - check category heaps and lists. 854 * dbg_check_cats - check category heaps and lists.
@@ -1001,8 +1003,8 @@ void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
1001out: 1003out:
1002 if (err) { 1004 if (err) {
1003 dbg_msg("failed cat %d hpos %d err %d", cat, i, err); 1005 dbg_msg("failed cat %d hpos %d err %d", cat, i, err);
1004 dbg_dump_stack(); 1006 dump_stack();
1005 dbg_dump_heap(c, heap, cat); 1007 ubifs_dump_heap(c, heap, cat);
1006 } 1008 }
1007} 1009}
1008 1010
@@ -1109,8 +1111,8 @@ static int scan_check_cb(struct ubifs_info *c,
1109 if (IS_ERR(sleb)) { 1111 if (IS_ERR(sleb)) {
1110 ret = PTR_ERR(sleb); 1112 ret = PTR_ERR(sleb);
1111 if (ret == -EUCLEAN) { 1113 if (ret == -EUCLEAN) {
1112 dbg_dump_lprops(c); 1114 ubifs_dump_lprops(c);
1113 dbg_dump_budg(c, &c->bi); 1115 ubifs_dump_budg(c, &c->bi);
1114 } 1116 }
1115 goto out; 1117 goto out;
1116 } 1118 }
@@ -1237,7 +1239,7 @@ out_print:
1237 ubifs_err("bad accounting of LEB %d: free %d, dirty %d flags %#x, " 1239 ubifs_err("bad accounting of LEB %d: free %d, dirty %d flags %#x, "
1238 "should be free %d, dirty %d", 1240 "should be free %d, dirty %d",
1239 lnum, lp->free, lp->dirty, lp->flags, free, dirty); 1241 lnum, lp->free, lp->dirty, lp->flags, free, dirty);
1240 dbg_dump_leb(c, lnum); 1242 ubifs_dump_leb(c, lnum);
1241out_destroy: 1243out_destroy:
1242 ubifs_scan_destroy(sleb); 1244 ubifs_scan_destroy(sleb);
1243 ret = -EINVAL; 1245 ret = -EINVAL;
@@ -1315,5 +1317,3 @@ int dbg_check_lprops(struct ubifs_info *c)
1315out: 1317out:
1316 return err; 1318 return err;
1317} 1319}
1318
1319#endif /* CONFIG_UBIFS_FS_DEBUG */