diff options
-rw-r--r-- | drivers/mtd/ubi/fastmap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c index 1a5f53c090d4..0648c6996d43 100644 --- a/drivers/mtd/ubi/fastmap.c +++ b/drivers/mtd/ubi/fastmap.c | |||
@@ -814,10 +814,8 @@ static int ubi_attach_fastmap(struct ubi_device *ubi, | |||
814 | if (max_sqnum > ai->max_sqnum) | 814 | if (max_sqnum > ai->max_sqnum) |
815 | ai->max_sqnum = max_sqnum; | 815 | ai->max_sqnum = max_sqnum; |
816 | 816 | ||
817 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) { | 817 | list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) |
818 | list_del(&tmp_aeb->u.list); | 818 | list_move_tail(&tmp_aeb->u.list, &ai->free); |
819 | list_add_tail(&tmp_aeb->u.list, &ai->free); | ||
820 | } | ||
821 | 819 | ||
822 | /* | 820 | /* |
823 | * If fastmap is leaking PEBs (must not happen), raise a | 821 | * If fastmap is leaking PEBs (must not happen), raise a |