aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.s.singh@gmail.com>2010-06-16 02:28:26 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2010-06-16 02:39:49 -0400
commit158132c9abbccce802def10e5ffaf044b266a6e1 (patch)
treed7d1532ace65bc89f9f4cf6e11c74ea745d079c4 /drivers/mtd/ubi
parentf5d5b1f8c12a7637ee1145f2f00358eb375edb54 (diff)
UBI: improve delete-compatible volumes handling
When a delete-compatible volume is found, it is first added to the 'corr' list, which contains "corrupted" PEBs which should be erased, and then it is added to the used volumes tree. However, the second step should not be done. This does not cause problems in practice, because we never access delete-compattible volumes, but it is still not the right thing to do. [Artem: amended the commit message and few prints] Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/scan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 37855e55651f..a86c04821368 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -842,11 +842,11 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
842 switch (vidh->compat) { 842 switch (vidh->compat) {
843 case UBI_COMPAT_DELETE: 843 case UBI_COMPAT_DELETE:
844 ubi_msg("\"delete\" compatible internal volume %d:%d" 844 ubi_msg("\"delete\" compatible internal volume %d:%d"
845 " found, remove it", vol_id, lnum); 845 " found, will remove it", vol_id, lnum);
846 err = add_to_list(si, pnum, ec, &si->corr); 846 err = add_to_list(si, pnum, ec, &si->corr);
847 if (err) 847 if (err)
848 return err; 848 return err;
849 break; 849 return 0;
850 850
851 case UBI_COMPAT_RO: 851 case UBI_COMPAT_RO:
852 ubi_msg("read-only compatible internal volume %d:%d" 852 ubi_msg("read-only compatible internal volume %d:%d"