diff options
Diffstat (limited to 'fs/jffs2/wbuf.c')
-rw-r--r-- | fs/jffs2/wbuf.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index a24d3d21b63d..3ea2f8db9358 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -414,13 +414,12 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c) | |||
414 | if (breakme++ == 20) { | 414 | if (breakme++ == 20) { |
415 | printk(KERN_NOTICE "Faking write error at 0x%08x\n", ofs); | 415 | printk(KERN_NOTICE "Faking write error at 0x%08x\n", ofs); |
416 | breakme = 0; | 416 | breakme = 0; |
417 | c->mtd->write(c->mtd, ofs, towrite, &retlen, | 417 | mtd_write(c->mtd, ofs, towrite, &retlen, brokenbuf); |
418 | brokenbuf); | ||
419 | ret = -EIO; | 418 | ret = -EIO; |
420 | } else | 419 | } else |
421 | #endif | 420 | #endif |
422 | ret = c->mtd->write(c->mtd, ofs, towrite, &retlen, | 421 | ret = mtd_write(c->mtd, ofs, towrite, &retlen, |
423 | rewrite_buf); | 422 | rewrite_buf); |
424 | 423 | ||
425 | if (ret || retlen != towrite || jffs2_verify_write(c, rewrite_buf, ofs)) { | 424 | if (ret || retlen != towrite || jffs2_verify_write(c, rewrite_buf, ofs)) { |
426 | /* Argh. We tried. Really we did. */ | 425 | /* Argh. We tried. Really we did. */ |
@@ -620,13 +619,14 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) | |||
620 | if (breakme++ == 20) { | 619 | if (breakme++ == 20) { |
621 | printk(KERN_NOTICE "Faking write error at 0x%08x\n", c->wbuf_ofs); | 620 | printk(KERN_NOTICE "Faking write error at 0x%08x\n", c->wbuf_ofs); |
622 | breakme = 0; | 621 | breakme = 0; |
623 | c->mtd->write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, | 622 | mtd_write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, |
624 | brokenbuf); | 623 | brokenbuf); |
625 | ret = -EIO; | 624 | ret = -EIO; |
626 | } else | 625 | } else |
627 | #endif | 626 | #endif |
628 | 627 | ||
629 | ret = c->mtd->write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, &retlen, c->wbuf); | 628 | ret = mtd_write(c->mtd, c->wbuf_ofs, c->wbuf_pagesize, |
629 | &retlen, c->wbuf); | ||
630 | 630 | ||
631 | if (ret) { | 631 | if (ret) { |
632 | printk(KERN_WARNING "jffs2_flush_wbuf(): Write failed with %d\n", ret); | 632 | printk(KERN_WARNING "jffs2_flush_wbuf(): Write failed with %d\n", ret); |
@@ -862,8 +862,8 @@ int jffs2_flash_writev(struct jffs2_sb_info *c, const struct kvec *invecs, | |||
862 | v += wbuf_retlen; | 862 | v += wbuf_retlen; |
863 | 863 | ||
864 | if (vlen >= c->wbuf_pagesize) { | 864 | if (vlen >= c->wbuf_pagesize) { |
865 | ret = c->mtd->write(c->mtd, outvec_to, PAGE_DIV(vlen), | 865 | ret = mtd_write(c->mtd, outvec_to, PAGE_DIV(vlen), |
866 | &wbuf_retlen, v); | 866 | &wbuf_retlen, v); |
867 | if (ret < 0 || wbuf_retlen != PAGE_DIV(vlen)) | 867 | if (ret < 0 || wbuf_retlen != PAGE_DIV(vlen)) |
868 | goto outfile; | 868 | goto outfile; |
869 | 869 | ||