]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/jffs2/erase.c
[JFFS2] Check whether garbage-collection actually obsoleted its victim.
[karo-tx-linux.git] / fs / jffs2 / erase.c
index addd3fc0e8771f9762457bc205d35b45ad03c0ab..a1db9180633fcb3476757af80f22b3e6621f06d2 100644 (file)
@@ -340,7 +340,7 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
                if (retlen < c->sector_size) {
                        /* Don't muck about if it won't let us point to the whole erase sector */
                        D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", retlen));
-                       c->mtd->unpoint(c->mtd, ebuf, jeb->offset, c->sector_size);
+                       c->mtd->unpoint(c->mtd, ebuf, jeb->offset, retlen);
                        goto do_flash_read;
                }
                wordebuf = ebuf-sizeof(*wordebuf);