Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfcf677d authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by Artem Bityutskiy
Browse files

UBIFS: dump stack when pnode or nnode reading fails



When we fail to read a pnode or nnode - print stacktrace if debugging is enabled.

Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent ae380ce0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}
@@ -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;