diff options
-rw-r--r-- | drivers/mtd/ubi/wl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 784681e42360..f25ae2910ad0 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -1072,10 +1072,9 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk, | |||
1072 | ubi_err("no reserved physical eraseblocks"); | 1072 | ubi_err("no reserved physical eraseblocks"); |
1073 | goto out_ro; | 1073 | goto out_ro; |
1074 | } | 1074 | } |
1075 | |||
1076 | spin_unlock(&ubi->volumes_lock); | 1075 | spin_unlock(&ubi->volumes_lock); |
1077 | ubi_msg("mark PEB %d as bad", pnum); | ||
1078 | 1076 | ||
1077 | ubi_msg("mark PEB %d as bad", pnum); | ||
1079 | err = ubi_io_mark_bad(ubi, pnum); | 1078 | err = ubi_io_mark_bad(ubi, pnum); |
1080 | if (err) | 1079 | if (err) |
1081 | goto out_ro; | 1080 | goto out_ro; |
@@ -1085,7 +1084,9 @@ static int erase_worker(struct ubi_device *ubi, struct ubi_work *wl_wrk, | |||
1085 | ubi->bad_peb_count += 1; | 1084 | ubi->bad_peb_count += 1; |
1086 | ubi->good_peb_count -= 1; | 1085 | ubi->good_peb_count -= 1; |
1087 | ubi_calculate_reserved(ubi); | 1086 | ubi_calculate_reserved(ubi); |
1088 | if (ubi->beb_rsvd_pebs == 0) | 1087 | if (ubi->beb_rsvd_pebs) |
1088 | ubi_msg("%d PEBs left in the reserve", ubi->beb_rsvd_pebs); | ||
1089 | else | ||
1089 | ubi_warn("last PEB from the reserved pool was used"); | 1090 | ubi_warn("last PEB from the reserved pool was used"); |
1090 | spin_unlock(&ubi->volumes_lock); | 1091 | spin_unlock(&ubi->volumes_lock); |
1091 | 1092 | ||