diff options
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r-- | drivers/mtd/ubi/vmt.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c index 177227e1f80d..a3ca2257e601 100644 --- a/drivers/mtd/ubi/vmt.c +++ b/drivers/mtd/ubi/vmt.c | |||
@@ -497,8 +497,6 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs) | |||
497 | 497 | ||
498 | dbg_msg("re-size volume %d to from %d to %d PEBs", | 498 | dbg_msg("re-size volume %d to from %d to %d PEBs", |
499 | vol_id, vol->reserved_pebs, reserved_pebs); | 499 | vol_id, vol->reserved_pebs, reserved_pebs); |
500 | ubi_assert(desc->mode == UBI_EXCLUSIVE); | ||
501 | ubi_assert(vol == ubi->volumes[vol_id]); | ||
502 | 500 | ||
503 | if (vol->vol_type == UBI_STATIC_VOLUME && | 501 | if (vol->vol_type == UBI_STATIC_VOLUME && |
504 | reserved_pebs < vol->used_ebs) { | 502 | reserved_pebs < vol->used_ebs) { |
@@ -526,7 +524,6 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs) | |||
526 | } | 524 | } |
527 | spin_unlock(&ubi->volumes_lock); | 525 | spin_unlock(&ubi->volumes_lock); |
528 | 526 | ||
529 | |||
530 | /* Reserve physical eraseblocks */ | 527 | /* Reserve physical eraseblocks */ |
531 | pebs = reserved_pebs - vol->reserved_pebs; | 528 | pebs = reserved_pebs - vol->reserved_pebs; |
532 | if (pebs > 0) { | 529 | if (pebs > 0) { |
@@ -746,11 +743,6 @@ static void paranoid_check_volume(struct ubi_device *ubi, int vol_id) | |||
746 | goto fail; | 743 | goto fail; |
747 | } | 744 | } |
748 | 745 | ||
749 | if (vol->upd_marker != 0 && vol->upd_marker != 1) { | ||
750 | ubi_err("bad upd_marker"); | ||
751 | goto fail; | ||
752 | } | ||
753 | |||
754 | if (vol->upd_marker && vol->corrupted) { | 746 | if (vol->upd_marker && vol->corrupted) { |
755 | dbg_err("update marker and corrupted simultaneously"); | 747 | dbg_err("update marker and corrupted simultaneously"); |
756 | goto fail; | 748 | goto fail; |
@@ -785,7 +777,7 @@ static void paranoid_check_volume(struct ubi_device *ubi, int vol_id) | |||
785 | 777 | ||
786 | n = (long long)vol->used_ebs * vol->usable_leb_size; | 778 | n = (long long)vol->used_ebs * vol->usable_leb_size; |
787 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) { | 779 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) { |
788 | if (vol->corrupted != 0) { | 780 | if (vol->corrupted) { |
789 | ubi_err("corrupted dynamic volume"); | 781 | ubi_err("corrupted dynamic volume"); |
790 | goto fail; | 782 | goto fail; |
791 | } | 783 | } |
@@ -802,10 +794,6 @@ static void paranoid_check_volume(struct ubi_device *ubi, int vol_id) | |||
802 | goto fail; | 794 | goto fail; |
803 | } | 795 | } |
804 | } else { | 796 | } else { |
805 | if (vol->corrupted != 0 && vol->corrupted != 1) { | ||
806 | ubi_err("bad corrupted"); | ||
807 | goto fail; | ||
808 | } | ||
809 | if (vol->used_ebs < 0 || vol->used_ebs > vol->reserved_pebs) { | 797 | if (vol->used_ebs < 0 || vol->used_ebs > vol->reserved_pebs) { |
810 | ubi_err("bad used_ebs"); | 798 | ubi_err("bad used_ebs"); |
811 | goto fail; | 799 | goto fail; |