* [PATCH] UBIFS: Fix dump messages in ubifs_dump_lprops
@ 2014-05-21 9:19 hujianyang
2014-05-27 12:06 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: hujianyang @ 2014-05-21 9:19 UTC (permalink / raw)
To: Artem Bityutskiy; +Cc: linux-mtd
Function ubifs_read_one_lp will not set @lp and returns
an error when ubifs_read_one_lp failed. We should not
perform ubifs_dump_lprop in this case because @lp is not
initialized as we wanted.
Signed-off-by: hujianyang <hujianyang@huawei.com>
---
fs/ubifs/debug.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 5157b86..177b015 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -745,8 +745,10 @@ void ubifs_dump_lprops(struct ubifs_info *c)
for (lnum = c->main_first; lnum < c->leb_cnt; lnum++) {
err = ubifs_read_one_lp(c, lnum, &lp);
- if (err)
+ if (err) {
ubifs_err("cannot read lprops for LEB %d", lnum);
+ continue;
+ }
ubifs_dump_lprop(c, &lp);
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] UBIFS: Fix dump messages in ubifs_dump_lprops
2014-05-21 9:19 [PATCH] UBIFS: Fix dump messages in ubifs_dump_lprops hujianyang
@ 2014-05-27 12:06 ` Artem Bityutskiy
0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2014-05-27 12:06 UTC (permalink / raw)
To: hujianyang; +Cc: linux-mtd
On Wed, 2014-05-21 at 17:19 +0800, hujianyang wrote:
> Function ubifs_read_one_lp will not set @lp and returns
> an error when ubifs_read_one_lp failed. We should not
> perform ubifs_dump_lprop in this case because @lp is not
> initialized as we wanted.
>
> Signed-off-by: hujianyang <hujianyang@huawei.com>
Pushed to linux-ubifs.git, thanks!
--
Best Regards,
Artem Bityutskiy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-27 12:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-21 9:19 [PATCH] UBIFS: Fix dump messages in ubifs_dump_lprops hujianyang
2014-05-27 12:06 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).