aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/wl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/wl.c')
-rw-r--r--drivers/mtd/ubi/wl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c
index a405d40faa23..36aa097203f9 100644
--- a/drivers/mtd/ubi/wl.c
+++ b/drivers/mtd/ubi/wl.c
@@ -793,7 +793,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk,
793 e1 = rb_entry(rb_first(&ubi->scrub), struct ubi_wl_entry, rb); 793 e1 = rb_entry(rb_first(&ubi->scrub), struct ubi_wl_entry, rb);
794 e2 = find_wl_entry(&ubi->free, WL_FREE_MAX_DIFF); 794 e2 = find_wl_entry(&ubi->free, WL_FREE_MAX_DIFF);
795 paranoid_check_in_wl_tree(e1, &ubi->scrub); 795 paranoid_check_in_wl_tree(e1, &ubi->scrub);
796 rb_erase(&e1->rb, &ubi->scrub); 796 rb_erase(&e1->rb, &ubi->scrub);
797 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum); 797 dbg_wl("scrub PEB %d to PEB %d", e1->pnum, e2->pnum);
798 } 798 }
799 799
@@ -1139,8 +1139,11 @@ int ubi_wl_put_peb(struct ubi_device *ubi, int pnum, int torture)
1139 /* 1139 /*
1140 * User is putting the physical eraseblock which was selected 1140 * User is putting the physical eraseblock which was selected
1141 * as the target the data is moved to. It may happen if the EBA 1141 * as the target the data is moved to. It may happen if the EBA
1142 * unit already re-mapped the LEB but the WL unit did has not 1142 * unit already re-mapped the LEB in 'ubi_eba_copy_leb()' but
1143 * put the PEB to the "used" tree. 1143 * the WL unit has not put the PEB to the "used" tree yet, but
1144 * it is about to do this. So we just set a flag which will
1145 * tell the WL worker that the PEB is not needed anymore and
1146 * should be sheduled for erasure.
1144 */ 1147 */
1145 dbg_wl("PEB %d is the target of data moving", pnum); 1148 dbg_wl("PEB %d is the target of data moving", pnum);
1146 ubi_assert(!ubi->move_to_put); 1149 ubi_assert(!ubi->move_to_put);