jffs2: do not support the MLC nand
authorHuang Shijie <b32955@freescale.com>
Wed, 25 Sep 2013 06:58:20 +0000 (14:58 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Sun, 27 Oct 2013 23:27:07 +0000 (16:27 -0700)
We should not support the MLC nand for jffs2. So if the nand type is
MLC, we quit immediatly.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
fs/jffs2/fs.c

index fe3c0527545f3b96d495f422a220339b0373e620..09b3ed45572475feb68b117fcf5b420a1a5e4d8f 100644 (file)
@@ -515,6 +515,10 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
 
        c = JFFS2_SB_INFO(sb);
 
+       /* Do not support the MLC nand */
+       if (c->mtd->type == MTD_MLCNANDFLASH)
+               return -EINVAL;
+
 #ifndef CONFIG_JFFS2_FS_WRITEBUFFER
        if (c->mtd->type == MTD_NANDFLASH) {
                pr_err("Cannot operate on NAND flash unless jffs2 NAND support is compiled in\n");