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:
parent
604b592e6f
commit
dac3698147
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue