aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/tnc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/tnc.c')
-rw-r--r--fs/ubifs/tnc.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c
index abd51331345e..349f31a30f40 100644
--- a/fs/ubifs/tnc.c
+++ b/fs/ubifs/tnc.c
@@ -339,8 +339,8 @@ static int lnc_add(struct ubifs_info *c, struct ubifs_zbranch *zbr,
339 339
340 err = ubifs_validate_entry(c, dent); 340 err = ubifs_validate_entry(c, dent);
341 if (err) { 341 if (err) {
342 dbg_dump_stack(); 342 dump_stack();
343 dbg_dump_node(c, dent); 343 ubifs_dump_node(c, dent);
344 return err; 344 return err;
345 } 345 }
346 346
@@ -372,8 +372,8 @@ static int lnc_add_directly(struct ubifs_info *c, struct ubifs_zbranch *zbr,
372 372
373 err = ubifs_validate_entry(c, node); 373 err = ubifs_validate_entry(c, node);
374 if (err) { 374 if (err) {
375 dbg_dump_stack(); 375 dump_stack();
376 dbg_dump_node(c, node); 376 ubifs_dump_node(c, node);
377 return err; 377 return err;
378 } 378 }
379 379
@@ -1733,8 +1733,8 @@ out_err:
1733 err = -EINVAL; 1733 err = -EINVAL;
1734out: 1734out:
1735 ubifs_err("bad node at LEB %d:%d", zbr->lnum, zbr->offs); 1735 ubifs_err("bad node at LEB %d:%d", zbr->lnum, zbr->offs);
1736 dbg_dump_node(c, buf); 1736 ubifs_dump_node(c, buf);
1737 dbg_dump_stack(); 1737 dump_stack();
1738 return err; 1738 return err;
1739} 1739}
1740 1740
@@ -1775,7 +1775,7 @@ int ubifs_tnc_bulk_read(struct ubifs_info *c, struct bu_info *bu)
1775 if (err && err != -EBADMSG) { 1775 if (err && err != -EBADMSG) {
1776 ubifs_err("failed to read from LEB %d:%d, error %d", 1776 ubifs_err("failed to read from LEB %d:%d, error %d",
1777 lnum, offs, err); 1777 lnum, offs, err);
1778 dbg_dump_stack(); 1778 dump_stack();
1779 dbg_tnck(&bu->key, "key "); 1779 dbg_tnck(&bu->key, "key ");
1780 return err; 1780 return err;
1781 } 1781 }
@@ -2403,7 +2403,7 @@ static int tnc_delete(struct ubifs_info *c, struct ubifs_znode *znode, int n)
2403 2403
2404 err = ubifs_add_dirt(c, zbr->lnum, zbr->len); 2404 err = ubifs_add_dirt(c, zbr->lnum, zbr->len);
2405 if (err) { 2405 if (err) {
2406 dbg_dump_znode(c, znode); 2406 ubifs_dump_znode(c, znode);
2407 return err; 2407 return err;
2408 } 2408 }
2409 2409
@@ -2649,7 +2649,7 @@ int ubifs_tnc_remove_range(struct ubifs_info *c, union ubifs_key *from_key,
2649 err = ubifs_add_dirt(c, znode->zbranch[i].lnum, 2649 err = ubifs_add_dirt(c, znode->zbranch[i].lnum,
2650 znode->zbranch[i].len); 2650 znode->zbranch[i].len);
2651 if (err) { 2651 if (err) {
2652 dbg_dump_znode(c, znode); 2652 ubifs_dump_znode(c, znode);
2653 goto out_unlock; 2653 goto out_unlock;
2654 } 2654 }
2655 dbg_tnck(key, "removing key "); 2655 dbg_tnck(key, "removing key ");
@@ -3275,8 +3275,6 @@ out_unlock:
3275 return err; 3275 return err;
3276} 3276}
3277 3277
3278#ifdef CONFIG_UBIFS_FS_DEBUG
3279
3280/** 3278/**
3281 * dbg_check_inode_size - check if inode size is correct. 3279 * dbg_check_inode_size - check if inode size is correct.
3282 * @c: UBIFS file-system description object 3280 * @c: UBIFS file-system description object
@@ -3335,13 +3333,11 @@ out_dump:
3335 (unsigned long)inode->i_ino, size, 3333 (unsigned long)inode->i_ino, size,
3336 ((loff_t)block) << UBIFS_BLOCK_SHIFT); 3334 ((loff_t)block) << UBIFS_BLOCK_SHIFT);
3337 mutex_unlock(&c->tnc_mutex); 3335 mutex_unlock(&c->tnc_mutex);
3338 dbg_dump_inode(c, inode); 3336 ubifs_dump_inode(c, inode);
3339 dbg_dump_stack(); 3337 dump_stack();
3340 return -EINVAL; 3338 return -EINVAL;
3341 3339
3342out_unlock: 3340out_unlock:
3343 mutex_unlock(&c->tnc_mutex); 3341 mutex_unlock(&c->tnc_mutex);
3344 return err; 3342 return err;
3345} 3343}
3346
3347#endif /* CONFIG_UBIFS_FS_DEBUG */