aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/eba.c
diff options
context:
space:
mode:
authorBhavesh Parekh <bparekh@nvidia.com>2011-11-30 17:43:42 +0530
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-25 17:24:37 -0800
commit75947f78d026b6eb2c4f16c54042325f97e3288a (patch)
tree4d81b1db35ca49ad96149cb6ca58c73572f2d3a2 /drivers/mtd/ubi/eba.c
parent729a9768761809079d07c9716f656da20a14eb2f (diff)
downloadkernel_samsung_smdk4412-75947f78d026b6eb2c4f16c54042325f97e3288a.zip
kernel_samsung_smdk4412-75947f78d026b6eb2c4f16c54042325f97e3288a.tar.gz
kernel_samsung_smdk4412-75947f78d026b6eb2c4f16c54042325f97e3288a.tar.bz2
UBI: fix missing scrub when there is a bit-flip
commit e801e128b2200c40a0ec236cf2330b2586b6e05a upstream. 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. Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/mtd/ubi/eba.c')
-rw-r--r--drivers/mtd/ubi/eba.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 4be6718..c696c94 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -1028,12 +1028,14 @@ int ubi_eba_copy_leb(struct ubi_device *ubi, int from, int to,
* 'ubi_wl_put_peb()' function on the @ubi->move_mutex. In turn, we are
* holding @ubi->move_mutex and go sleep on the LEB lock. So, if the
* LEB is already locked, we just do not move it and return
- * %MOVE_CANCEL_RACE, which means that UBI will re-try, but later.
+ * %MOVE_RETRY. Note, we do not return %MOVE_CANCEL_RACE here because
+ * we do not know the reasons of the contention - it may be just a
+ * normal I/O on this LEB, so we want to re-try.
*/
err = leb_write_trylock(ubi, vol_id, lnum);
if (err) {
dbg_wl("contention on LEB %d:%d, cancel", vol_id, lnum);
- return MOVE_CANCEL_RACE;
+ return MOVE_RETRY;
}
/*