aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/eba.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/eba.c')
-rw-r--r--drivers/mtd/ubi/eba.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c
index 5fa726f9c1f..b703ac7729c 100644
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -341,7 +341,7 @@ int ubi_eba_unmap_leb(struct ubi_device *ubi, struct ubi_volume *vol,
341 dbg_eba("erase LEB %d:%d, PEB %d", vol_id, lnum, pnum); 341 dbg_eba("erase LEB %d:%d, PEB %d", vol_id, lnum, pnum);
342 342
343 vol->eba_tbl[lnum] = UBI_LEB_UNMAPPED; 343 vol->eba_tbl[lnum] = UBI_LEB_UNMAPPED;
344 err = ubi_wl_put_peb(ubi, pnum, 0); 344 err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 0);
345 345
346out_unlock: 346out_unlock:
347 leb_write_unlock(ubi, vol_id, lnum); 347 leb_write_unlock(ubi, vol_id, lnum);
@@ -550,7 +550,7 @@ retry:
550 ubi_free_vid_hdr(ubi, vid_hdr); 550 ubi_free_vid_hdr(ubi, vid_hdr);
551 551
552 vol->eba_tbl[lnum] = new_pnum; 552 vol->eba_tbl[lnum] = new_pnum;
553 ubi_wl_put_peb(ubi, pnum, 1); 553 ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);
554 554
555 ubi_msg("data was successfully recovered"); 555 ubi_msg("data was successfully recovered");
556 return 0; 556 return 0;
@@ -558,7 +558,7 @@ retry:
558out_unlock: 558out_unlock:
559 mutex_unlock(&ubi->buf_mutex); 559 mutex_unlock(&ubi->buf_mutex);
560out_put: 560out_put:
561 ubi_wl_put_peb(ubi, new_pnum, 1); 561 ubi_wl_put_peb(ubi, vol_id, lnum, new_pnum, 1);
562 ubi_free_vid_hdr(ubi, vid_hdr); 562 ubi_free_vid_hdr(ubi, vid_hdr);
563 return err; 563 return err;
564 564
@@ -568,7 +568,7 @@ write_error:
568 * get another one. 568 * get another one.
569 */ 569 */
570 ubi_warn("failed to write to PEB %d", new_pnum); 570 ubi_warn("failed to write to PEB %d", new_pnum);
571 ubi_wl_put_peb(ubi, new_pnum, 1); 571 ubi_wl_put_peb(ubi, vol_id, lnum, new_pnum, 1);
572 if (++tries > UBI_IO_RETRIES) { 572 if (++tries > UBI_IO_RETRIES) {
573 ubi_free_vid_hdr(ubi, vid_hdr); 573 ubi_free_vid_hdr(ubi, vid_hdr);
574 return err; 574 return err;
@@ -686,7 +686,7 @@ write_error:
686 * eraseblock, so just put it and request a new one. We assume that if 686 * eraseblock, so just put it and request a new one. We assume that if
687 * this physical eraseblock went bad, the erase code will handle that. 687 * this physical eraseblock went bad, the erase code will handle that.
688 */ 688 */
689 err = ubi_wl_put_peb(ubi, pnum, 1); 689 err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);
690 if (err || ++tries > UBI_IO_RETRIES) { 690 if (err || ++tries > UBI_IO_RETRIES) {
691 ubi_ro_mode(ubi); 691 ubi_ro_mode(ubi);
692 leb_write_unlock(ubi, vol_id, lnum); 692 leb_write_unlock(ubi, vol_id, lnum);
@@ -804,7 +804,7 @@ write_error:
804 return err; 804 return err;
805 } 805 }
806 806
807 err = ubi_wl_put_peb(ubi, pnum, 1); 807 err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);
808 if (err || ++tries > UBI_IO_RETRIES) { 808 if (err || ++tries > UBI_IO_RETRIES) {
809 ubi_ro_mode(ubi); 809 ubi_ro_mode(ubi);
810 leb_write_unlock(ubi, vol_id, lnum); 810 leb_write_unlock(ubi, vol_id, lnum);
@@ -901,7 +901,7 @@ retry:
901 } 901 }
902 902
903 if (vol->eba_tbl[lnum] >= 0) { 903 if (vol->eba_tbl[lnum] >= 0) {
904 err = ubi_wl_put_peb(ubi, vol->eba_tbl[lnum], 0); 904 err = ubi_wl_put_peb(ubi, vol_id, lnum, vol->eba_tbl[lnum], 0);
905 if (err) 905 if (err)
906 goto out_leb_unlock; 906 goto out_leb_unlock;
907 } 907 }
@@ -926,7 +926,7 @@ write_error:
926 goto out_leb_unlock; 926 goto out_leb_unlock;
927 } 927 }
928 928
929 err = ubi_wl_put_peb(ubi, pnum, 1); 929 err = ubi_wl_put_peb(ubi, vol_id, lnum, pnum, 1);
930 if (err || ++tries > UBI_IO_RETRIES) { 930 if (err || ++tries > UBI_IO_RETRIES) {
931 ubi_ro_mode(ubi); 931 ubi_ro_mode(ubi);
932 goto out_leb_unlock; 932 goto out_leb_unlock;