Patchwork [03/30] UBIFS: dump stack when pnode or nnode reading fails

login
register
mail settings
Submitter Artem Bityutskiy
Date June 9, 2011, 9:04 a.m.
Message ID <1307610310-28691-4-git-send-email-dedekind1@gmail.com>
Download mbox | patch
Permalink /patch/99682/
State Accepted
Commit bfcf677decd8051c305b1d8fda407d069c2361e3
Headers show

Comments

Artem Bityutskiy - June 9, 2011, 9:04 a.m.
From: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

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

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
---
 fs/ubifs/lpt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index ef5155e..04713cd 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -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;