aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/wbuf.c
diff options
context:
space:
mode:
authorArtem B. Bityutskiy <dedekind@infradead.org>2005-07-24 11:14:17 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 11:06:49 -0500
commite0c8e42f8f218063ff6838b25038ccef7ddf257e (patch)
treea072b5cfd6b9af41dfef13821383af584d989ca6 /fs/jffs2/wbuf.c
parent6dac02a5e1bba0bb88ece50160fc4a64cccf30d1 (diff)
[JFFS2] Debug code clean up - step 3
Various simplifiactions. printk format corrections. Convert more code to use the new debug functions. Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/wbuf.c')
-rw-r--r--fs/jffs2/wbuf.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index 5a820f4ea358..251ac3d86f99 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -9,7 +9,7 @@
9 * 9 *
10 * For licensing information, see the file 'LICENCE' in this directory. 10 * For licensing information, see the file 'LICENCE' in this directory.
11 * 11 *
12 * $Id: wbuf.c,v 1.94 2005/07/17 12:01:43 dedekind Exp $ 12 * $Id: wbuf.c,v 1.96 2005/07/22 10:32:08 dedekind Exp $
13 * 13 *
14 */ 14 */
15 15
@@ -139,7 +139,6 @@ static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock
139{ 139{
140 D1(printk("About to refile bad block at %08x\n", jeb->offset)); 140 D1(printk("About to refile bad block at %08x\n", jeb->offset));
141 141
142 jffs2_dbg_dump_block_lists(c);
143 /* File the existing block on the bad_used_list.... */ 142 /* File the existing block on the bad_used_list.... */
144 if (c->nextblock == jeb) 143 if (c->nextblock == jeb)
145 c->nextblock = NULL; 144 c->nextblock = NULL;
@@ -156,7 +155,6 @@ static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock
156 c->nr_erasing_blocks++; 155 c->nr_erasing_blocks++;
157 jffs2_erase_pending_trigger(c); 156 jffs2_erase_pending_trigger(c);
158 } 157 }
159 jffs2_dbg_dump_block_lists(c);
160 158
161 /* Adjust its size counts accordingly */ 159 /* Adjust its size counts accordingly */
162 c->wasted_size += jeb->free_size; 160 c->wasted_size += jeb->free_size;
@@ -164,8 +162,9 @@ static void jffs2_block_refile(struct jffs2_sb_info *c, struct jffs2_eraseblock
164 jeb->wasted_size += jeb->free_size; 162 jeb->wasted_size += jeb->free_size;
165 jeb->free_size = 0; 163 jeb->free_size = 0;
166 164
167 jffs2_dbg_acct_sanity_check(c,jeb); 165 jffs2_dbg_dump_block_lists_nolock(c);
168 jffs2_dbg_acct_paranoia_check(c, jeb); 166 jffs2_dbg_acct_sanity_check_nolock(c,jeb);
167 jffs2_dbg_acct_paranoia_check_nolock(c, jeb);
169} 168}
170 169
171/* Recover from failure to write wbuf. Recover the nodes up to the 170/* Recover from failure to write wbuf. Recover the nodes up to the
@@ -392,11 +391,11 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c)
392 else 391 else
393 jeb->last_node = container_of(first_raw, struct jffs2_raw_node_ref, next_phys); 392 jeb->last_node = container_of(first_raw, struct jffs2_raw_node_ref, next_phys);
394 393
395 jffs2_dbg_acct_sanity_check(c,jeb); 394 jffs2_dbg_acct_sanity_check_nolock(c, jeb);
396 jffs2_dbg_acct_paranoia_check(c, jeb); 395 jffs2_dbg_acct_paranoia_check_nolock(c, jeb);
397 396
398 jffs2_dbg_acct_sanity_check(c,new_jeb); 397 jffs2_dbg_acct_sanity_check_nolock(c, new_jeb);
399 jffs2_dbg_acct_paranoia_check(c, new_jeb); 398 jffs2_dbg_acct_paranoia_check_nolock(c, new_jeb);
400 399
401 spin_unlock(&c->erase_completion_lock); 400 spin_unlock(&c->erase_completion_lock);
402 401