aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/wl.c
diff options
context:
space:
mode:
authorBhavesh Parekh <bparekh@nvidia.com>2011-11-30 07:13:42 -0500
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-11-30 07:13:42 -0500
commite801e128b2200c40a0ec236cf2330b2586b6e05a (patch)
tree2f348a09690fea8484d2a4310c1f979f8156b46a /drivers/mtd/ubi/wl.c
parenteaecf43a6970c8d0ef54a31427c82a99e4863fe8 (diff)
UBI: fix missing scrub when there is a bit-flip
Under some cases, when scrubbing the PEB if we did not get the lock on the PEB it fails to scrub. Add that PEB again to the scrub list Artem: minor amendments. Cc: stable@kernel.org [2.6.31+] Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd/ubi/wl.c')
-rw-r--r--drivers/mtd/ubi/wl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index 42c684cf3688..277c429a138f 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -795,7 +795,10 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
795 protect = 1; 795 protect = 1;
796 goto out_not_moved; 796 goto out_not_moved;
797 } 797 }
798 798 if (err == MOVE_RETRY) {
799 scrubbing = 1;
800 goto out_not_moved;
801 }
799 if (err == MOVE_CANCEL_BITFLIPS || err == MOVE_TARGET_WR_ERR || 802 if (err == MOVE_CANCEL_BITFLIPS || err == MOVE_TARGET_WR_ERR ||
800 err == MOVE_TARGET_RD_ERR) { 803 err == MOVE_TARGET_RD_ERR) {
801 /* 804 /*