aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/lprops.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-06-03 01:31:29 -0400
committerArtem Bityutskiy <dedekind1@gmail.com>2011-07-04 03:54:28 -0400
commit2b1844a8c934723134ee1ff313e51d0d281cdef1 (patch)
tree1c490adba95a54eb14f9b00890ce9b09050358f7 /fs/ubifs/lprops.c
parentd808efb407e1a2cf83a8d21411157195f26bdef9 (diff)
UBIFS: introduce helper functions for debugging checks and tests
This patch introduces helper functions for all debugging checks, so instead of doing if (!(ubifs_chk_flags & UBIFS_CHK_GEN)) we now do if (!dbg_is_chk_gen(c)) This is a preparation to further changes where the flags will go away, and we'll need to only change the helper functions, but the code which utilizes them won't be touched. At the same time this patch removes 'dbg_force_in_the_gaps()', 'dbg_force_in_the_gaps_enabled()', and dbg_failure_mode helpers for consistency. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/lprops.c')
-rw-r--r--fs/ubifs/lprops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index 98b8e73c454c..f8a181e647cc 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -860,7 +860,7 @@ int dbg_check_cats(struct ubifs_info *c)
860 struct list_head *pos; 860 struct list_head *pos;
861 int i, cat; 861 int i, cat;
862 862
863 if (!(ubifs_chk_flags & (UBIFS_CHK_GEN | UBIFS_CHK_LPROPS))) 863 if (!dbg_is_chk_gen(c) && !dbg_is_chk_lprops(c))
864 return 0; 864 return 0;
865 865
866 list_for_each_entry(lprops, &c->empty_list, list) { 866 list_for_each_entry(lprops, &c->empty_list, list) {
@@ -958,7 +958,7 @@ void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
958{ 958{
959 int i = 0, j, err = 0; 959 int i = 0, j, err = 0;
960 960
961 if (!(ubifs_chk_flags & (UBIFS_CHK_GEN | UBIFS_CHK_LPROPS))) 961 if (!dbg_is_chk_gen(c) && !dbg_is_chk_lprops(c))
962 return; 962 return;
963 963
964 for (i = 0; i < heap->cnt; i++) { 964 for (i = 0; i < heap->cnt; i++) {
@@ -1262,7 +1262,7 @@ int dbg_check_lprops(struct ubifs_info *c)
1262 int i, err; 1262 int i, err;
1263 struct ubifs_lp_stats lst; 1263 struct ubifs_lp_stats lst;
1264 1264
1265 if (!(ubifs_chk_flags & UBIFS_CHK_LPROPS)) 1265 if (!dbg_is_chk_lprops(c))
1266 return 0; 1266 return 0;
1267 1267
1268 /* 1268 /*