aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/lpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/lpt.c')
-rw-r--r--fs/ubifs/lpt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index ce33b2beb151..d46b19ec1815 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -1311,7 +1311,7 @@ out:
1311 ubifs_err("error %d reading pnode at %d:%d", err, lnum, offs); 1311 ubifs_err("error %d reading pnode at %d:%d", err, lnum, offs);
1312 ubifs_dump_pnode(c, pnode, parent, iip); 1312 ubifs_dump_pnode(c, pnode, parent, iip);
1313 dump_stack(); 1313 dump_stack();
1314 dbg_msg("calc num: %d", calc_pnode_num_from_parent(c, parent, iip)); 1314 ubifs_err("calc num: %d", calc_pnode_num_from_parent(c, parent, iip));
1315 kfree(pnode); 1315 kfree(pnode);
1316 return err; 1316 return err;
1317} 1317}
@@ -1749,7 +1749,10 @@ int ubifs_lpt_init(struct ubifs_info *c, int rd, int wr)
1749 return 0; 1749 return 0;
1750 1750
1751out_err: 1751out_err:
1752 ubifs_lpt_free(c, 0); 1752 if (wr)
1753 ubifs_lpt_free(c, 1);
1754 if (rd)
1755 ubifs_lpt_free(c, 0);
1753 return err; 1756 return err;
1754} 1757}
1755 1758
@@ -2234,8 +2237,7 @@ int dbg_check_lpt_nodes(struct ubifs_info *c, struct ubifs_cnode *cnode,
2234 /* cnode is a nnode */ 2237 /* cnode is a nnode */
2235 num = calc_nnode_num(row, col); 2238 num = calc_nnode_num(row, col);
2236 if (cnode->num != num) { 2239 if (cnode->num != num) {
2237 ubifs_err("nnode num %d expected %d " 2240 ubifs_err("nnode num %d expected %d parent num %d iip %d",
2238 "parent num %d iip %d",
2239 cnode->num, num, 2241 cnode->num, num,
2240 (nnode ? nnode->num : 0), cnode->iip); 2242 (nnode ? nnode->num : 0), cnode->iip);
2241 return -EINVAL; 2243 return -EINVAL;