aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/ubi/scan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 23e30ac089ce..ce26b1b25ba7 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -437,6 +437,9 @@ int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si,
437 if (IS_ERR(sv) < 0) 437 if (IS_ERR(sv) < 0)
438 return PTR_ERR(sv); 438 return PTR_ERR(sv);
439 439
440 if (si->max_sqnum < sqnum)
441 si->max_sqnum = sqnum;
442
440 /* 443 /*
441 * Walk the RB-tree of logical eraseblocks of volume @vol_id to look 444 * Walk the RB-tree of logical eraseblocks of volume @vol_id to look
442 * if this is the first instance of this logical eraseblock or not. 445 * if this is the first instance of this logical eraseblock or not.
@@ -563,9 +566,6 @@ int ubi_scan_add_used(const struct ubi_device *ubi, struct ubi_scan_info *si,
563 sv->last_data_size = be32_to_cpu(vid_hdr->data_size); 566 sv->last_data_size = be32_to_cpu(vid_hdr->data_size);
564 } 567 }
565 568
566 if (si->max_sqnum < sqnum)
567 si->max_sqnum = sqnum;
568
569 sv->leb_count += 1; 569 sv->leb_count += 1;
570 rb_link_node(&seb->u.rb, parent, p); 570 rb_link_node(&seb->u.rb, parent, p);
571 rb_insert_color(&seb->u.rb, &sv->root); 571 rb_insert_color(&seb->u.rb, &sv->root);