UBIFS: Fix dump messages in ubifs_dump_lprops

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>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
hujianyang 2014-05-21 17:19:45 +08:00 committed by Artem Bityutskiy
parent 604b592e6f
commit dac3698147
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}