Skip to contentSkip to conversation

UBIFS: Fix dump messages in ubifs_dump_lprops

PATCH Applied hujianyang 2 participants 2 messages May 21, 2014 – May 27, 2014

Subsystems (2)
lore
Share & tools
lore

hujianyang

author
#0 lore raw

PATCH 1/1 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.

---
 fs/ubifs/debug.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ubifs/debug.c +3 -1
index 5157b86..177b015 100644
@@ -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);
 	}
Signature · 1 line
1.8.1.4
#1 lore raw
Quoted 6 lines · hujianyang

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.

Pushed to linux-ubifs.git, thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy