aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/ubi/vmt.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 32c6ceb1a067..8e8d6fae7a02 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -358,7 +358,8 @@ int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req)
358 ubi->vol_count += 1; 358 ubi->vol_count += 1;
359 spin_unlock(&ubi->volumes_lock); 359 spin_unlock(&ubi->volumes_lock);
360 360
361 err = paranoid_check_volumes(ubi); 361 if (paranoid_check_volumes(ubi))
362 dbg_err("check failed while creating volume %d", vol_id);
362 return err; 363 return err;
363 364
364out_sysfs: 365out_sysfs:
@@ -465,8 +466,9 @@ int ubi_remove_volume(struct ubi_volume_desc *desc, int no_vtbl)
465 ubi->vol_count -= 1; 466 ubi->vol_count -= 1;
466 spin_unlock(&ubi->volumes_lock); 467 spin_unlock(&ubi->volumes_lock);
467 468
468 if (!no_vtbl) 469 if (!no_vtbl && paranoid_check_volumes(ubi))
469 err = paranoid_check_volumes(ubi); 470 dbg_err("check failed while removing volume %d", vol_id);
471
470 return err; 472 return err;
471 473
472out_err: 474out_err:
@@ -587,7 +589,8 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
587 (long long)vol->used_ebs * vol->usable_leb_size; 589 (long long)vol->used_ebs * vol->usable_leb_size;
588 } 590 }
589 591
590 err = paranoid_check_volumes(ubi); 592 if (paranoid_check_volumes(ubi))
593 dbg_err("check failed while re-sizing volume %d", vol_id);
591 return err; 594 return err;
592 595
593out_acc: 596out_acc:
@@ -635,8 +638,8 @@ int ubi_rename_volumes(struct ubi_device *ubi, struct list_head *rename_list)
635 } 638 }
636 } 639 }
637 640
638 if (!err) 641 if (!err && paranoid_check_volumes(ubi))
639 err = paranoid_check_volumes(ubi); 642 ;
640 return err; 643 return err;
641} 644}
642 645
@@ -688,7 +691,8 @@ int ubi_add_volume(struct ubi_device *ubi, struct ubi_volume *vol)
688 return err; 691 return err;
689 } 692 }
690 693
691 err = paranoid_check_volumes(ubi); 694 if (paranoid_check_volumes(ubi))
695 dbg_err("check failed while adding volume %d", vol_id);
692 return err; 696 return err;
693 697
694out_gluebi: 698out_gluebi: