[PATCH] Tons of bogus warning messages on attmpt to mount on M18

Alexey Korolev akorolev at infradead.org
Mon Nov 26 14:04:19 EST 2007


Hi

We faced a lot of warning messages if to mount jffs2 on image generated by mkfs utility.

Warning messages are these:
JFFS2 warning: (696) check_node_data: MTD point returned len too short: 1112 inst
ead of 1816.
JFFS2 warning: (696) check_node_data: MTD point returned len too short: 1276 inst
ead of 2156.
JFFS2 warning: (696) check_node_data: MTD point returned len too short: 1098 inst
ead of 1746.
And many many more.

This patch fixes the issue of warning messages on M18 (Sibley).

Signed-off-by: Alexey Korolev <akorolev at infradead.org>
---------------
diff -aur a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
--- a/fs/jffs2/readinode.c      2007-11-26 21:42:22.000000000 +0300
+++ b/fs/jffs2/readinode.c      2007-11-26 21:39:33.000000000 +0300
@@ -64,7 +64,7 @@
         * adding and jffs2_flash_read_end() interface. */
        if (c->mtd->point) {
                err = c->mtd->point(c->mtd, ofs, len, &retlen, &buffer);
-               if (!err && retlen < tn->csize) {
+               if (!err && retlen < len) {
                        JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize);
                        c->mtd->unpoint(c->mtd, buffer, ofs, len);
                } else if (err)
-----------------

Thanks,
Alexey

p/s The patch has been verified several times. It is applicable and it shouldn't break anything.




More information about the linux-mtd mailing list