diff options
| -rw-r--r-- | drivers/mtd/ubi/block.c | 2 | ||||
| -rw-r--r-- | drivers/mtd/ubi/wl.c | 6 | ||||
| -rw-r--r-- | fs/ubifs/super.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c index 7ff473c871a9..8d659e6a1b4c 100644 --- a/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c | |||
| @@ -431,7 +431,7 @@ int ubiblock_create(struct ubi_volume_info *vi) | |||
| 431 | * Create one workqueue per volume (per registered block device). | 431 | * Create one workqueue per volume (per registered block device). |
| 432 | * Rembember workqueues are cheap, they're not threads. | 432 | * Rembember workqueues are cheap, they're not threads. |
| 433 | */ | 433 | */ |
| 434 | dev->wq = alloc_workqueue(gd->disk_name, 0, 0); | 434 | dev->wq = alloc_workqueue("%s", 0, 0, gd->disk_name); |
| 435 | if (!dev->wq) | 435 | if (!dev->wq) |
| 436 | goto out_free_queue; | 436 | goto out_free_queue; |
| 437 | INIT_WORK(&dev->work, ubiblock_do_work); | 437 | INIT_WORK(&dev->work, ubiblock_do_work); |
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 02317c1c0238..0f3425dac910 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
| @@ -671,6 +671,8 @@ static struct ubi_wl_entry *get_peb_for_wl(struct ubi_device *ubi) | |||
| 671 | 671 | ||
| 672 | e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF); | 672 | e = find_wl_entry(ubi, &ubi->free, WL_FREE_MAX_DIFF); |
| 673 | self_check_in_wl_tree(ubi, e, &ubi->free); | 673 | self_check_in_wl_tree(ubi, e, &ubi->free); |
| 674 | ubi->free_count--; | ||
| 675 | ubi_assert(ubi->free_count >= 0); | ||
| 674 | rb_erase(&e->u.rb, &ubi->free); | 676 | rb_erase(&e->u.rb, &ubi->free); |
| 675 | 677 | ||
| 676 | return e; | 678 | return e; |
| @@ -684,6 +686,9 @@ int ubi_wl_get_peb(struct ubi_device *ubi) | |||
| 684 | peb = __wl_get_peb(ubi); | 686 | peb = __wl_get_peb(ubi); |
| 685 | spin_unlock(&ubi->wl_lock); | 687 | spin_unlock(&ubi->wl_lock); |
| 686 | 688 | ||
| 689 | if (peb < 0) | ||
| 690 | return peb; | ||
| 691 | |||
| 687 | err = ubi_self_check_all_ff(ubi, peb, ubi->vid_hdr_aloffset, | 692 | err = ubi_self_check_all_ff(ubi, peb, ubi->vid_hdr_aloffset, |
| 688 | ubi->peb_size - ubi->vid_hdr_aloffset); | 693 | ubi->peb_size - ubi->vid_hdr_aloffset); |
| 689 | if (err) { | 694 | if (err) { |
| @@ -1068,6 +1073,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk, | |||
| 1068 | 1073 | ||
| 1069 | /* Give the unused PEB back */ | 1074 | /* Give the unused PEB back */ |
| 1070 | wl_tree_add(e2, &ubi->free); | 1075 | wl_tree_add(e2, &ubi->free); |
| 1076 | ubi->free_count++; | ||
| 1071 | goto out_cancel; | 1077 | goto out_cancel; |
| 1072 | } | 1078 | } |
| 1073 | self_check_in_wl_tree(ubi, e1, &ubi->used); | 1079 | self_check_in_wl_tree(ubi, e1, &ubi->used); |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index a1266089eca1..a81c7b556896 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
| @@ -1556,7 +1556,7 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
| 1556 | if (c->space_fixup) { | 1556 | if (c->space_fixup) { |
| 1557 | err = ubifs_fixup_free_space(c); | 1557 | err = ubifs_fixup_free_space(c); |
| 1558 | if (err) | 1558 | if (err) |
| 1559 | return err; | 1559 | goto out; |
| 1560 | } | 1560 | } |
| 1561 | 1561 | ||
| 1562 | err = check_free_space(c); | 1562 | err = check_free_space(c); |
