aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/jffs2/erase.c2
-rw-r--r--fs/jffs2/readinode.c2
-rw-r--r--fs/jffs2/scan.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
index addd3fc0e877..a1db9180633f 100644
--- a/fs/jffs2/erase.c
+++ b/fs/jffs2/erase.c
@@ -340,7 +340,7 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
340 if (retlen < c->sector_size) { 340 if (retlen < c->sector_size) {
341 /* Don't muck about if it won't let us point to the whole erase sector */ 341 /* Don't muck about if it won't let us point to the whole erase sector */
342 D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", retlen)); 342 D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", retlen));
343 c->mtd->unpoint(c->mtd, ebuf, jeb->offset, c->sector_size); 343 c->mtd->unpoint(c->mtd, ebuf, jeb->offset, retlen);
344 goto do_flash_read; 344 goto do_flash_read;
345 } 345 }
346 wordebuf = ebuf-sizeof(*wordebuf); 346 wordebuf = ebuf-sizeof(*wordebuf);
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index 8d4319c56b17..2eae5d2dbebe 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -65,7 +65,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
65 err = c->mtd->point(c->mtd, ofs, len, &retlen, &buffer); 65 err = c->mtd->point(c->mtd, ofs, len, &retlen, &buffer);
66 if (!err && retlen < tn->csize) { 66 if (!err && retlen < tn->csize) {
67 JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize); 67 JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize);
68 c->mtd->unpoint(c->mtd, buffer, ofs, len); 68 c->mtd->unpoint(c->mtd, buffer, ofs, retlen);
69 } else if (err) 69 } else if (err)
70 JFFS2_WARNING("MTD point failed: error code %d.\n", err); 70 JFFS2_WARNING("MTD point failed: error code %d.\n", err);
71 else 71 else
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 59dd408e5432..35ef8d83366f 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -101,7 +101,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
101 if (!ret && pointlen < c->mtd->size) { 101 if (!ret && pointlen < c->mtd->size) {
102 /* Don't muck about if it won't let us point to the whole flash */ 102 /* Don't muck about if it won't let us point to the whole flash */
103 D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", pointlen)); 103 D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", pointlen));
104 c->mtd->unpoint(c->mtd, flashbuf, 0, c->mtd->size); 104 c->mtd->unpoint(c->mtd, flashbuf, 0, pointlen);
105 flashbuf = NULL; 105 flashbuf = NULL;
106 } 106 }
107 if (ret) 107 if (ret)