|
@@ -1534,6 +1534,7 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
|
|
INIT_LIST_HEAD(&ubi->pq[i]);
|
|
INIT_LIST_HEAD(&ubi->pq[i]);
|
|
ubi->pq_head = 0;
|
|
ubi->pq_head = 0;
|
|
|
|
|
|
|
|
+ ubi->free_count = 0;
|
|
list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) {
|
|
list_for_each_entry_safe(aeb, tmp, &ai->erase, u.list) {
|
|
cond_resched();
|
|
cond_resched();
|
|
|
|
|
|
@@ -1552,7 +1553,6 @@ int ubi_wl_init(struct ubi_device *ubi, struct ubi_attach_info *ai)
|
|
found_pebs++;
|
|
found_pebs++;
|
|
}
|
|
}
|
|
|
|
|
|
- ubi->free_count = 0;
|
|
|
|
list_for_each_entry(aeb, &ai->free, u.list) {
|
|
list_for_each_entry(aeb, &ai->free, u.list) {
|
|
cond_resched();
|
|
cond_resched();
|
|
|
|
|