Skip to content

Commit

Permalink
UBIFS: dump stack when pnode or nnode reading fails
Browse files Browse the repository at this point in the history
When we fail to read a pnode or nnode - print stacktrace if debugging is enabled.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jul 4, 2011
1 parent ae380ce commit bfcf677
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ubifs/lpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,7 @@ int ubifs_read_nnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip)

out:
ubifs_err("error %d reading nnode at %d:%d", err, lnum, offs);
dbg_dump_stack();
kfree(nnode);
return err;
}
Expand Down Expand Up @@ -1312,6 +1313,7 @@ static int read_pnode(struct ubifs_info *c, struct ubifs_nnode *parent, int iip)
out:
ubifs_err("error %d reading pnode at %d:%d", err, lnum, offs);
dbg_dump_pnode(c, pnode, parent, iip);
dbg_dump_stack();
dbg_msg("calc num: %d", calc_pnode_num_from_parent(c, parent, iip));
kfree(pnode);
return err;
Expand Down

0 comments on commit bfcf677

Please sign in to comment.