Skip to contentSkip to conversation

UBI: fix peb scan

PATCH In review Alexander Schmidt 2 participants 2 messages Mar 2, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBI: fix peb scan

Hi Artem,

Volumes containing only one PEB got a wrong vtr->last_eb_bytes.

---
 drivers/mtd/ubi/scan.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/ubi/scan.c +1 -1
@@ -588,7 +588,7 @@ int ubi_scan_add_peb(const struct ubi_in
 	seb->scrub = bitflips;
 	seb->leb_ver = leb_ver;
 
-	if (sv->highest_lnum < lnum) {
+	if (sv->highest_lnum <= lnum) {
 		sv->highest_lnum = lnum;
 		sv->last_data_size = ubi32_to_cpu(vid_hdr->data_size);
 	}
#1 lore raw
Quoted 4 lines · Alexander Schmidt

Hi Artem,

Volumes containing only one PEB got a wrong vtr->last_eb_bytes.

Oh, thanks!

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)