[PATCH] UBI: fix delete compatible internal volume scan

Brijesh Singh brijesh.s.singh at gmail.com
Tue May 18 13:40:49 EDT 2010


This patch resolves a possible bug. Scan is adding delete compatible
blocks to both corr list and used list.
It should return after adding the block to corr list.

Signed-off-by: Brijesh Singh <brijesh.s.singh at gmail.com>
---
 drivers/mtd/ubi/scan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 6b7c0c4..fde15f1 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -845,7 +845,7 @@ static int process_eb(struct ubi_device *ubi,
struct ubi_scan_info *si,
                        err = add_to_list(si, pnum, ec, &si->corr);
                        if (err)
                                return err;
-                       break;
+                       return 0;

                case UBI_COMPAT_RO:
                        ubi_msg("read-only compatible internal volume %d:%d"
--



More information about the linux-mtd mailing list