diff options
Diffstat (limited to 'fs/ubifs/io.c')
-rw-r--r-- | fs/ubifs/io.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index e18b9889a51b..2290d5866725 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c | |||
@@ -988,30 +988,32 @@ int ubifs_read_node(const struct ubifs_info *c, void *buf, int type, int len, | |||
988 | return err; | 988 | return err; |
989 | 989 | ||
990 | if (type != ch->node_type) { | 990 | if (type != ch->node_type) { |
991 | ubifs_err("bad node type (%d but expected %d)", | 991 | ubifs_errc(c, "bad node type (%d but expected %d)", |
992 | ch->node_type, type); | 992 | ch->node_type, type); |
993 | goto out; | 993 | goto out; |
994 | } | 994 | } |
995 | 995 | ||
996 | err = ubifs_check_node(c, buf, lnum, offs, 0, 0); | 996 | err = ubifs_check_node(c, buf, lnum, offs, 0, 0); |
997 | if (err) { | 997 | if (err) { |
998 | ubifs_err("expected node type %d", type); | 998 | ubifs_errc(c, "expected node type %d", type); |
999 | return err; | 999 | return err; |
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | l = le32_to_cpu(ch->len); | 1002 | l = le32_to_cpu(ch->len); |
1003 | if (l != len) { | 1003 | if (l != len) { |
1004 | ubifs_err("bad node length %d, expected %d", l, len); | 1004 | ubifs_errc(c, "bad node length %d, expected %d", l, len); |
1005 | goto out; | 1005 | goto out; |
1006 | } | 1006 | } |
1007 | 1007 | ||
1008 | return 0; | 1008 | return 0; |
1009 | 1009 | ||
1010 | out: | 1010 | out: |
1011 | ubifs_err("bad node at LEB %d:%d, LEB mapping status %d", lnum, offs, | 1011 | ubifs_errc(c, "bad node at LEB %d:%d, LEB mapping status %d", lnum, |
1012 | ubi_is_mapped(c->ubi, lnum)); | 1012 | offs, ubi_is_mapped(c->ubi, lnum)); |
1013 | ubifs_dump_node(c, buf); | 1013 | if (!c->probing) { |
1014 | dump_stack(); | 1014 | ubifs_dump_node(c, buf); |
1015 | dump_stack(); | ||
1016 | } | ||
1015 | return -EINVAL; | 1017 | return -EINVAL; |
1016 | } | 1018 | } |
1017 | 1019 | ||